Home
last modified time | relevance | path

Searched refs:set (Results 1 – 25 of 282) sorted by relevance

12345678910>>...12

/libcore/luni/src/test/java/libcore/java/util/
DTreeSetTest.java30 TreeSet<String> set = new TreeSet<String>(); in testEmptySetSerialization() local
31 new SerializationTester<TreeSet<String>>(set, s).test(); in testEmptySetSerialization()
39 TreeSet<String> set = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER); in testSerializationWithComparator() local
40 set.add("a"); in testSerializationWithComparator()
41 set.add("b"); in testSerializationWithComparator()
42 new SerializationTester<NavigableSet<String>>(set, s) { in testSerializationWithComparator() argument
54 TreeSet<String> set = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER); in testSubSetSerialization() local
55 set.add("a"); in testSubSetSerialization()
56 set.add("b"); in testSubSetSerialization()
57 set.add("c"); in testSubSetSerialization()
[all …]
DGregorianCalendarTest.java71 greg.set(Calendar.WEEK_OF_YEAR, differentWeekOfYear); in test_computeFields_dayOfWeekAndWeekOfYearSet()
73 greg.set(Calendar.DAY_OF_WEEK, differentDayOfWeek); in test_computeFields_dayOfWeekAndWeekOfYearSet()
79 greg.set(Calendar.DAY_OF_WEEK, differentDayOfWeek); in test_computeFields_dayOfWeekAndWeekOfYearSet()
80 greg.set(Calendar.WEEK_OF_YEAR, differentWeekOfYear); in test_computeFields_dayOfWeekAndWeekOfYearSet()
87 greg.set(Calendar.WEEK_OF_YEAR, differentWeekOfYear); in test_computeFields_dayOfWeekAndWeekOfYearSet()
88 greg.set(Calendar.DAY_OF_WEEK, differentDayOfWeek); in test_computeFields_dayOfWeekAndWeekOfYearSet()
254 cal.set(2016, Calendar.MARCH, 29); in test_getWeekYear()
259 cal.set(2016, Calendar.JANUARY, 1); in test_getWeekYear()
261 cal.set(2015, Calendar.DECEMBER, 31); in test_getWeekYear()
266 cal.set(2016, Calendar.JANUARY, 1); in test_getWeekYear()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DCalendarTest.java44 cal.set(Calendar.YEAR, 2002); in test_setII()
49 cal.set(Calendar.YEAR, 2002); in test_setII()
50 cal.set(Calendar.MONTH, Calendar.MARCH); in test_setII()
55 cal.set(Calendar.YEAR, 2002); in test_setII()
56 cal.set(Calendar.DATE, 24); in test_setII()
60 cal.set(Calendar.MONTH, Calendar.OCTOBER); in test_setII()
61 cal.set(Calendar.DATE, 31); in test_setII()
62 cal.set(Calendar.MONTH, Calendar.NOVEMBER); in test_setII()
63 cal.set(Calendar.DATE, 26); in test_setII()
68 cal.set(Calendar.DATE, 27); in test_setII()
[all …]
DBitSetTest.java71 bs.set(128); in test_equalsLjava_lang_Object()
85 bs.set(10); in test_hashCode()
98 bs.set(0, bs.size() - 1); // ensure all bits are 1's in test_clear()
99 bs.set(bs.size() - 1); in test_clear()
141 bs.set(25); in test_clearI()
166 bitset.set(i); in test_clearII()
174 bs.set(0, initialSize); in test_clearII()
204 bs.set(0, initialSize); in test_clearII()
219 bs.set(0, initialSize); in test_clearII()
230 bs.set(0, initialSize); in test_clearII()
[all …]
DEnumMapTest.java341 Set set = enumSizeMap.entrySet(); in test_entrySet() local
344 assertSame("Should be same", set1, set); in test_entrySet()
346 set.add(mockEntry); in test_entrySet()
352 assertTrue("Returned false for contained object", set in test_entrySet()
355 assertFalse("Returned true for uncontained object", set in test_entrySet()
357 assertFalse("Returned true for uncontained object", set in test_entrySet()
360 assertFalse("Returned true for uncontained object", set in test_entrySet()
362 assertFalse("Returned true for uncontained object", set in test_entrySet()
366 assertTrue("Returned false for contained object", set in test_entrySet()
368 assertTrue("Returned false when the object can be removed", set in test_entrySet()
[all …]
DEnumSetTest.java120 EnumSet<HugeEnumCount> set; in test_iterator_HugeEnumSet() local
125 set = EnumSet.range(HugeEnumCount.NO1, HugeEnumCount.NO65); in test_iterator_HugeEnumSet()
126 array = set.toArray(); in test_iterator_HugeEnumSet()
127 for (HugeEnumCount count : set) { in test_iterator_HugeEnumSet()
133 set = EnumSet.range(HugeEnumCount.NO1, HugeEnumCount.NO130); in test_iterator_HugeEnumSet()
134 array = set.toArray(); in test_iterator_HugeEnumSet()
135 for (HugeEnumCount count : set) { in test_iterator_HugeEnumSet()
141 EnumSet<HugeEnumCount> set = EnumSet.noneOf(HugeEnumCount.class); in testRemoveIteratorRemoveFromHugeEnumSet() local
142 set.add(HugeEnumCount.NO64); in testRemoveIteratorRemoveFromHugeEnumSet()
143 set.add(HugeEnumCount.NO65); in testRemoveIteratorRemoveFromHugeEnumSet()
[all …]
/libcore/ojluni/src/main/java/java/util/stream/
DStreamOpFlag.java249 set(Type.SPLITERATOR).set(Type.STREAM).setAndClear(Type.OP)),
270 set(Type.SPLITERATOR).set(Type.STREAM).setAndClear(Type.OP)),
283 set(Type.SPLITERATOR).set(Type.STREAM).setAndClear(Type.OP).clear(Type.TERMINAL_OP)
298 set(Type.SPLITERATOR).set(Type.STREAM).clear(Type.OP)),
329 set(Type.OP).set(Type.TERMINAL_OP));
384 private static MaskBuilder set(Type t) { in set() method in StreamOpFlag
385 return new MaskBuilder(new EnumMap<>(Type.class)).set(t); in set()
400 MaskBuilder set(Type t) { in set() method in StreamOpFlag.MaskBuilder
434 private final int set; field in StreamOpFlag
451 this.set = SET_BITS << position; in StreamOpFlag()
[all …]
/libcore/ojluni/src/test/java/util/stream/boottest/java/util/stream/
DStreamOpFlagsTest.java59 sourceFlags |= flags.get(f).set(); in testInitialOpFlagsFromSourceFlags()
70 int sourceFlags = f.set(); in testSameCombine()
74 opsFlags = combineOpFlags(f.set(), opsFlags); in testSameCombine()
90 sourceFlags = f.set(); in testOpClear()
105 opsFlags = combineOpFlags(f.set(), opsFlags); in testOpInject()
106 assertEquals(f.set(), toStreamFlags(opsFlags)); in testOpInject()
109 sourceFlags = f.set(); in testOpInject()
112 opsFlags = combineOpFlags(f.set(), opsFlags); in testOpInject()
119 … = StreamOpFlagTestHelper.allStreamFlags().stream().map(StreamOpFlag::set).collect(toList()); in testPairSet()
128 opsFlags = combineOpFlags(f1.set(), opsFlags); in testPairSet()
[all …]
/libcore/support/src/test/java/tests/support/
DSupport_SetTest.java24 Set<Integer> set; // must contain only the Integers 0 to 99 field in Support_SetTest
32 set = s; in Support_SetTest()
39 !set.add(new Integer(50))); in runTest()
40 assertTrue("Set Test - Removing an element did not change the set", set in runTest()
44 !set.contains(new Integer(50))); in runTest()
45 set.add(new Integer(50)); in runTest()
46 new Support_CollectionTest("", set).runTest(); in runTest()
/libcore/ojluni/src/main/java/sun/security/x509/
DKeyUsageExtension.java92 private void set(int position, boolean val) { in set() method in KeyUsageExtension
187 public void set(String name, Object obj) throws IOException { in set() method in KeyUsageExtension
193 set(0,val); in set()
195 set(1,val); in set()
197 set(2,val); in set()
199 set(3,val); in set()
201 set(4,val); in set()
203 set(5,val); in set()
205 set(6,val); in set()
207 set(7,val); in set()
[all …]
/libcore/luni/src/test/java/libcore/java/sql/
DOldResultSetGetterTests.java928 cal.set(Calendar.HOUR_OF_DAY, 12); in testGetTimeInt()
929 cal.set(Calendar.MINUTE, 35); in testGetTimeInt()
930 cal.set(Calendar.SECOND, 45); in testGetTimeInt()
931 cal.set(Calendar.MILLISECOND, 0); in testGetTimeInt()
939 cal2.set(Calendar.YEAR, 2007); in testGetTimeInt()
940 cal2.set(Calendar.MONTH, Calendar.OCTOBER); in testGetTimeInt()
941 cal2.set(Calendar.DATE, 9); in testGetTimeInt()
942 cal2.set(Calendar.HOUR_OF_DAY, 14); in testGetTimeInt()
943 cal2.set(Calendar.MINUTE, 28); in testGetTimeInt()
944 cal2.set(Calendar.SECOND, 02); in testGetTimeInt()
[all …]
/libcore/jsr166-tests/src/test/java/jsr166/
DTreeSetTest.java551 TreeSet set = set5(); in testSubSetContents() local
552 SortedSet sm = set.subSet(two, four); in testSubSetContents()
571 assertFalse(set.contains(two)); in testSubSetContents()
572 assertEquals(4, set.size()); in testSubSetContents()
578 assertEquals(3, set.size()); in testSubSetContents()
582 TreeSet set = set5(); in testSubSetContents2() local
583 SortedSet sm = set.subSet(two, three); in testSubSetContents2()
600 assertFalse(set.contains(two)); in testSubSetContents2()
601 assertEquals(4, set.size()); in testSubSetContents2()
605 assertEquals(4, set.size()); in testSubSetContents2()
[all …]
DConcurrentSkipListSetTest.java548 ConcurrentSkipListSet set = set5(); in testSubSetContents() local
549 SortedSet sm = set.subSet(two, four); in testSubSetContents()
568 assertFalse(set.contains(two)); in testSubSetContents()
569 assertEquals(4, set.size()); in testSubSetContents()
575 assertEquals(3, set.size()); in testSubSetContents()
579 ConcurrentSkipListSet set = set5(); in testSubSetContents2() local
580 SortedSet sm = set.subSet(two, three); in testSubSetContents2()
597 assertFalse(set.contains(two)); in testSubSetContents2()
598 assertEquals(4, set.size()); in testSubSetContents2()
602 assertEquals(4, set.size()); in testSubSetContents2()
[all …]
DAtomicLongArrayTest.java70 aa.set(index, 1); in testIndexing()
102 aa.set(i, 1); in testGetSet()
104 aa.set(i, 2); in testGetSet()
106 aa.set(i, -3); in testGetSet()
132 aa.set(i, 1); in testCompareAndSet()
149 a.set(0, 1); in testCompareAndSetInMultipleThreads()
170 aa.set(i, 1); in testWeakCompareAndSet()
185 aa.set(i, 1); in testGetAndSet()
198 aa.set(i, 1); in testGetAndAdd()
212 aa.set(i, 1); in testGetAndDecrement()
[all …]
DAtomicIntegerArrayTest.java71 aa.set(index, 1); in testIndexing()
103 aa.set(i, 1); in testGetSet()
105 aa.set(i, 2); in testGetSet()
107 aa.set(i, -3); in testGetSet()
133 aa.set(i, 1); in testCompareAndSet()
150 a.set(0, 1); in testCompareAndSetInMultipleThreads()
171 aa.set(i, 1); in testWeakCompareAndSet()
186 aa.set(i, 1); in testGetAndSet()
199 aa.set(i, 1); in testGetAndAdd()
213 aa.set(i, 1); in testGetAndDecrement()
[all …]
DAtomicIntegerTest.java53 ai.set(2); in testGetSet()
55 ai.set(-3); in testGetSet()
155 ai.set(-2); in testGetAndIncrement()
191 ai.set(-2); in testIncrementAndGet()
205 x.set(22); in testSerialization()
219 ai.set(x); in testToString()
231 ai.set(x); in testIntValue()
243 ai.set(x); in testLongValue()
255 ai.set(x); in testFloatValue()
267 ai.set(x); in testDoubleValue()
DAtomicLongTest.java55 ai.set(2); in testGetSet()
57 ai.set(-3); in testGetSet()
157 ai.set(-2); in testGetAndIncrement()
193 ai.set(-2); in testIncrementAndGet()
207 x.set(-22); in testSerialization()
222 ai.set(x); in testToString()
234 ai.set(x); in testIntValue()
246 ai.set(x); in testLongValue()
258 ai.set(x); in testFloatValue()
270 ai.set(x); in testDoubleValue()
/libcore/ojluni/src/main/java/java/util/
DBitSet.java436 public void set(int bitIndex) { in set() method in BitSet
456 public void set(int bitIndex, boolean value) { in set() method in BitSet
458 set(bitIndex); in set()
474 public void set(int fromIndex, int toIndex) { in set() method in BitSet
518 public void set(int fromIndex, int toIndex, boolean value) { in set() method in BitSet
520 set(fromIndex, toIndex); in set()
874 public boolean intersects(BitSet set) { in intersects() argument
875 for (int i = Math.min(wordsInUse, set.wordsInUse) - 1; i >= 0; i--) in intersects()
876 if ((words[i] & set.words[i]) != 0) in intersects()
903 public void and(BitSet set) { in and() argument
[all …]
/libcore/ojluni/src/main/java/sun/util/
DResourceBundleEnumeration.java39 Set<String> set; field in ResourceBundleEnumeration
49 public ResourceBundleEnumeration(Set<String> set, Enumeration<String> enumeration) { in ResourceBundleEnumeration() argument
50 this.set = set; in ResourceBundleEnumeration()
51 this.iterator = set.iterator(); in ResourceBundleEnumeration()
64 if (set.contains(next)) { in hasMoreElements()
/libcore/ojluni/src/main/java/sun/security/provider/certpath/
DPolicyNodeImpl.java303 Set<PolicyNodeImpl> set = new HashSet<>(); in getPolicyNodes() local
304 getPolicyNodes(depth, set); in getPolicyNodes()
305 return set; in getPolicyNodes()
312 private void getPolicyNodes(int depth, Set<PolicyNodeImpl> set) { in getPolicyNodes() argument
315 set.add(this); in getPolicyNodes()
318 node.getPolicyNodes(depth, set); in getPolicyNodes()
347 HashSet<PolicyNodeImpl> set = new HashSet<>(); in getPolicyNodesExpectedHelper() local
351 set.addAll(node.getPolicyNodesExpectedHelper(depth, in getPolicyNodesExpectedHelper()
358 set.add(this); in getPolicyNodesExpectedHelper()
361 set.add(this); in getPolicyNodesExpectedHelper()
[all …]
/libcore/luni/src/test/java/libcore/java/util/function/
DLongPredicateTest.java34 LongPredicate alwaysTrue = x -> { alwaysTrueInvoked.set(true); return true; }; in testAnd()
35 LongPredicate alwaysTrue2 = x -> { alwaysTrue2Invoked.set(true); return true; }; in testAnd()
36 LongPredicate alwaysFalse = x -> { alwaysFalseInvoked.set(true); return false; }; in testAnd()
37 LongPredicate alwaysFalse2 = x -> { alwaysFalse2Invoked.set(true); return false; }; in testAnd()
85 LongPredicate alwaysTrue = x -> { alwaysTrueInvoked.set(true); return true; }; in testOr()
86 LongPredicate alwaysTrue2 = x -> { alwaysTrue2Invoked.set(true); return true; }; in testOr()
87 LongPredicate alwaysFalse = x -> { alwaysFalseInvoked.set(true); return false; }; in testOr()
88 LongPredicate alwaysFalse2 = x -> { alwaysFalse2Invoked.set(true); return false; }; in testOr()
121 toReset.set(false); in resetToFalse()
DPredicateTest.java37 x -> { alwaysTrueInvoked.set(true); assertSame(x, arg); return true; }; in testAnd()
39 x -> { alwaysTrue2Invoked.set(true); assertSame(x, arg); return true; }; in testAnd()
41 x -> { alwaysFalseInvoked.set(true); assertSame(x, arg); return false; }; in testAnd()
43 x -> { alwaysFalse2Invoked.set(true); assertSame(x, arg); return false; }; in testAnd()
94 x -> { alwaysTrueInvoked.set(true); assertSame(x, arg); return true; }; in testOr()
96 x -> { alwaysTrue2Invoked.set(true); assertSame(x, arg); return true; }; in testOr()
98 x -> { alwaysFalseInvoked.set(true); assertSame(x, arg); return false; }; in testOr()
100 x -> { alwaysFalse2Invoked.set(true); assertSame(x, arg); return false; }; in testOr()
133 toReset.set(false); in resetToFalse()
DIntPredicateTest.java37 x -> { alwaysTrueInvoked.set(true); assertEquals(x, arg); return true; }; in testAnd()
39 x -> { alwaysTrue2Invoked.set(true); assertEquals(x, arg); return true; }; in testAnd()
41 x -> { alwaysFalseInvoked.set(true); assertEquals(x, arg); return false; }; in testAnd()
43 x -> { alwaysFalse2Invoked.set(true); assertEquals(x, arg); return false; }; in testAnd()
94 x -> { alwaysTrueInvoked.set(true); assertEquals(x, arg); return true; }; in testOr()
96 x -> { alwaysTrue2Invoked.set(true); assertEquals(x, arg); return true; }; in testOr()
98 x -> { alwaysFalseInvoked.set(true); assertEquals(x, arg); return false; }; in testOr()
100 x -> { alwaysFalse2Invoked.set(true); assertEquals(x, arg); return false; }; in testOr()
133 toReset.set(false); in resetToFalse()
DDoublePredicateTest.java37 x -> { alwaysTrueInvoked.set(true); assertEquals(x, arg); return true; }; in testAnd()
39 x -> { alwaysTrue2Invoked.set(true); assertEquals(x, arg); return true; }; in testAnd()
41 x -> { alwaysFalseInvoked.set(true); assertEquals(x, arg); return false; }; in testAnd()
43 x -> { alwaysFalse2Invoked.set(true); assertEquals(x, arg); return false; }; in testAnd()
94 x -> { alwaysTrueInvoked.set(true); assertEquals(x, arg); return true; }; in testOr()
96 x -> { alwaysTrue2Invoked.set(true); assertEquals(x, arg); return true; }; in testOr()
98 x -> { alwaysFalseInvoked.set(true); assertEquals(x, arg); return false; }; in testOr()
100 x -> { alwaysFalse2Invoked.set(true); assertEquals(x, arg); return false; }; in testOr()
133 toReset.set(false); in resetToFalse()
/libcore/ojluni/src/main/java/java/net/
DURLEncoder.java129 dontNeedEncoding.set(i);
132 dontNeedEncoding.set(i);
135 dontNeedEncoding.set(i);
137 dontNeedEncoding.set(' '); /* encoding a space to a + is done
139 dontNeedEncoding.set('-');
140 dontNeedEncoding.set('_');
141 dontNeedEncoding.set('.');
142 dontNeedEncoding.set('*');

12345678910>>...12