/libcore/ojluni/src/test/java/util/SequencedCollection/ |
D | SimpleSortedSet.java | 34 final SortedSet<E> set; field in SimpleSortedSet 37 set = new TreeSet<E>(); in SimpleSortedSet() 41 set = new TreeSet<>(c); in SimpleSortedSet() 45 set = new TreeSet<>(comparator); in SimpleSortedSet() 51 return set.equals(o); in equals() 55 return set.hashCode(); in hashCode() 59 return set.toString(); in toString() 65 return set.add(e); in add() 69 return set.addAll(c); in addAll() 73 set.clear(); in clear() [all …]
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | TreeSetTest.java | 32 TreeSet<String> set = new TreeSet<String>(); in testEmptySetSerialization() local 33 new SerializationTester<TreeSet<String>>(set, s).test(); in testEmptySetSerialization() 41 TreeSet<String> set = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER); in testSerializationWithComparator() local 42 set.add("a"); in testSerializationWithComparator() 43 set.add("b"); in testSerializationWithComparator() 44 new SerializationTester<NavigableSet<String>>(set, s) { in testSerializationWithComparator() argument 56 TreeSet<String> set = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER); in testSubSetSerialization() local 57 set.add("a"); in testSubSetSerialization() 58 set.add("b"); in testSubSetSerialization() 59 set.add("c"); in testSubSetSerialization() [all …]
|
D | CollectionsTest.java | 384 NavigableSet set = Collections.checkedNavigableSet(new TreeSet<>(), String.class); in test_checkedNavigableSet() local 385 check_navigableSet(set, Arrays.asList(), "absent element"); in test_checkedNavigableSet() 387 set.add("element 1"); in test_checkedNavigableSet() 388 set.add("element 2"); in test_checkedNavigableSet() 390 check_navigableSet(set, elementsInOrder, "absent element"); in test_checkedNavigableSet() 392 assertEquals(set, new HashSet<>(elementsInOrder)); in test_checkedNavigableSet() 393 assertEquals(new HashSet<>(elementsInOrder), set); in test_checkedNavigableSet() 394 assertEquals(2, set.size()); in test_checkedNavigableSet() 395 assertTrue(set.contains("element 1")); in test_checkedNavigableSet() 396 assertTrue(set.contains("element 2")); in test_checkedNavigableSet() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | CalendarTest.java | 44 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 …]
|
D | BitSetTest.java | 71 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 …]
|
D | EnumSetTest.java | 121 EnumSet<HugeEnumCount> set; in test_iterator_HugeEnumSet() local 126 set = EnumSet.range(HugeEnumCount.NO1, HugeEnumCount.NO65); in test_iterator_HugeEnumSet() 127 array = set.toArray(); in test_iterator_HugeEnumSet() 128 for (HugeEnumCount count : set) { in test_iterator_HugeEnumSet() 134 set = EnumSet.range(HugeEnumCount.NO1, HugeEnumCount.NO130); in test_iterator_HugeEnumSet() 135 array = set.toArray(); in test_iterator_HugeEnumSet() 136 for (HugeEnumCount count : set) { in test_iterator_HugeEnumSet() 142 EnumSet<HugeEnumCount> set = EnumSet.noneOf(HugeEnumCount.class); in testRemoveIteratorRemoveFromHugeEnumSet() local 143 set.add(HugeEnumCount.NO64); in testRemoveIteratorRemoveFromHugeEnumSet() 144 set.add(HugeEnumCount.NO65); in testRemoveIteratorRemoveFromHugeEnumSet() [all …]
|
D | EnumMapTest.java | 341 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 …]
|
/libcore/ojluni/src/main/java/jdk/net/ |
D | Sockets.java | 339 Set<SocketOption<?>> set = options.get(socketType); in supportedOptions() local 340 if (set == null) { in supportedOptions() 343 return set; in supportedOptions() 356 Set<SocketOption<?>> set = new HashSet<>(); in initOptionSets() local 357 set.add(StandardSocketOptions.SO_KEEPALIVE); in initOptionSets() 358 set.add(StandardSocketOptions.SO_SNDBUF); in initOptionSets() 359 set.add(StandardSocketOptions.SO_RCVBUF); in initOptionSets() 360 set.add(StandardSocketOptions.SO_REUSEADDR); in initOptionSets() 361 set.add(StandardSocketOptions.SO_LINGER); in initOptionSets() 362 set.add(StandardSocketOptions.IP_TOS); in initOptionSets() [all …]
|
/libcore/luni/src/test/java/libcore/javax/security/auth/ |
D | SubjectTest.java | 41 private Set<Principal> set; field in SubjectTest 46 set = Set.of(new PrincipalImpl()); in setUp() 47 subject = new Subject(true, set, set, set); in setUp() 52 assertEquals(set, subject.getPrincipals()); in getPrincipals() 54 assertEquals(set, subject.getPrincipals(PrincipalImpl.class)); in getPrincipals() 55 assertEquals(set, subject.getPrincipals(Principal.class)); in getPrincipals() 62 assertEquals(set, subject.getPrivateCredentials()); in getPrivateCredentials() 64 assertEquals(set, subject.getPrivateCredentials(PrincipalImpl.class)); in getPrivateCredentials() 65 assertEquals(set, subject.getPrivateCredentials(Principal.class)); in getPrivateCredentials() 72 assertEquals(set, subject.getPublicCredentials()); in getPublicCredentials() [all …]
|
/libcore/luni/src/test/java/libcore/java/util/concurrent/ |
D | ConcurrentSkipListSetTest.java | 39 ConcurrentSkipListSet set = new ConcurrentSkipListSet(); in createPopulatedSet() local 40 set.add("A"); in createPopulatedSet() 41 set.add("B"); in createPopulatedSet() 42 set.add("C"); in createPopulatedSet() 43 set.add("D"); in createPopulatedSet() 44 set.add("E"); in createPopulatedSet() 45 set.add("F"); in createPopulatedSet() 46 assertFalse(set.isEmpty()); in createPopulatedSet() 47 return set; in createPopulatedSet() 69 ConcurrentSkipListSet set = createPopulatedSet(); in testClone() local [all …]
|
D | ConcurrentHashMapTest.java | 223 Set<Long> set = ConcurrentHashMap.<Long>newKeySet(capacity); in testNewKeySetWithCapacity() local 224 assertTrue(set.isEmpty()); in testNewKeySetWithCapacity() 226 assertTrue(set.add(i)); in testNewKeySetWithCapacity() 228 assertFalse(set.isEmpty()); in testNewKeySetWithCapacity() 229 assertEquals(capacity, set.size()); in testNewKeySetWithCapacity() 236 Set<Long> set = ConcurrentHashMap.<Long>newKeySet(capacity); in testNewKeySetWithZeroCapacity() local 237 assertTrue(set.isEmpty()); in testNewKeySetWithZeroCapacity() 239 assertTrue(set.add(i)); in testNewKeySetWithZeroCapacity() 241 assertFalse(set.isEmpty()); in testNewKeySetWithZeroCapacity() 242 assertEquals(elements, set.size()); in testNewKeySetWithZeroCapacity() [all …]
|
/libcore/ojluni/src/test/java/util/EnumSet/ |
D | SmallEnumIteratorRemoveResilience.java | 49 final Set<SmallEnum> set = EnumSet.noneOf(SmallEnum.class); in testSmallEnumRemoveResilience() local 51 set.add(SmallEnum.e0); in testSmallEnumRemoveResilience() 52 set.add(SmallEnum.e1); in testSmallEnumRemoveResilience() 54 final Iterator<SmallEnum> iterator = set.iterator(); in testSmallEnumRemoveResilience() 56 int size = set.size(); in testSmallEnumRemoveResilience() 60 checkSetAfterRemoval(set, size, element); in testSmallEnumRemoveResilience() 62 size = set.size(); in testSmallEnumRemoveResilience() 65 set.remove(element); in testSmallEnumRemoveResilience() 66 checkSetAfterRemoval(set, size, element); in testSmallEnumRemoveResilience() 77 checkSetAfterRemoval(set, size, element); in testSmallEnumRemoveResilience() [all …]
|
D | LargeEnumIteratorRemoveResilience.java | 61 final Set<LargeEnum> set = EnumSet.noneOf(LargeEnum.class); in testLargeEnumIterator() local 63 set.add(LargeEnum.e2D); in testLargeEnumIterator() 64 set.add(LargeEnum.e42); in testLargeEnumIterator() 66 final Iterator<LargeEnum> iterator = set.iterator(); in testLargeEnumIterator() 68 int size = set.size(); in testLargeEnumIterator() 72 checkSetAfterRemoval(set, size, element); in testLargeEnumIterator() 74 size = set.size(); in testLargeEnumIterator() 77 set.remove(element); in testLargeEnumIterator() 78 checkSetAfterRemoval(set, size, element); in testLargeEnumIterator() 89 checkSetAfterRemoval(set, size, element); in testLargeEnumIterator() [all …]
|
/libcore/ojluni/src/main/java/java/util/stream/ |
D | StreamOpFlag.java | 250 set(Type.SPLITERATOR).set(Type.STREAM).setAndClear(Type.OP)), 271 set(Type.SPLITERATOR).set(Type.STREAM).setAndClear(Type.OP)), 284 set(Type.SPLITERATOR).set(Type.STREAM).setAndClear(Type.OP).clear(Type.TERMINAL_OP) 299 set(Type.SPLITERATOR).set(Type.STREAM).clear(Type.OP)), 330 set(Type.OP).set(Type.TERMINAL_OP)), 343 set(Type.OP)); 397 private static MaskBuilder set(Type t) { in set() method in StreamOpFlag 398 return new MaskBuilder(new EnumMap<>(Type.class)).set(t); in set() 413 MaskBuilder set(Type t) { in set() method in StreamOpFlag.MaskBuilder 447 private final int set; field in StreamOpFlag [all …]
|
/libcore/ojluni/src/test/java/util/stream/boottest/java/util/stream/ |
D | StreamOpFlagsTest.java | 59 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/ojluni/src/test/java/util/Collection/ |
D | CollectionDefaults.java | 133 public void testProvidedWithNull(final Set<Integer> set) { in testProvidedWithNull() argument 135 set.forEach(null); in testProvidedWithNull() 140 set.removeIf(null); in testProvidedWithNull() 153 final Collection<Integer> set = test.collection; in testForEach() local 156 set.forEach(null); in testForEach() 160 if (set instanceof Set && !((set instanceof SortedSet) in testForEach() 161 || (set instanceof LinkedHashSet))) { in testForEach() 162 CollectionAsserts.assertContentsUnordered(set, original, test.toString()); in testForEach() 164 CollectionAsserts.assertContents(set, original, test.toString()); in testForEach() 168 set.forEach(actual::add); in testForEach() [all …]
|
/libcore/luni/src/test/java/libcore/java/sql/ |
D | OldResultSetGetterTests.java | 928 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/ojluni/src/main/java/sun/security/x509/ |
D | KeyUsageExtension.java | 93 private void set(int position, boolean val) { in set() method in KeyUsageExtension 188 public void set(String name, Object obj) throws IOException { in set() method in KeyUsageExtension 194 set(0,val); in set() 196 set(1,val); in set() 198 set(2,val); in set() 200 set(3,val); in set() 202 set(4,val); in set() 204 set(5,val); in set() 206 set(6,val); in set() 208 set(7,val); in set() [all …]
|
/libcore/support/src/test/java/tests/support/ |
D | Support_SetTest.java | 24 Set<Integer> set; // must contain only the Integers 0 to 99 field in Support_SetTest 32 set = s; in Support_SetTest() 39 !set.add(Integer.valueOf(50))); in runTest() 40 assertTrue("Set Test - Removing an element did not change the set", set in runTest() 44 !set.contains(Integer.valueOf(50))); in runTest() 45 set.add(Integer.valueOf(50)); in runTest() 46 new Support_CollectionTest("", set).runTest(); in runTest()
|
/libcore/ojluni/src/test/java/util/concurrent/tck/ |
D | ConcurrentSkipListSetTest.java | 578 ConcurrentSkipListSet set = set5(); in testSubSetContents() local 579 SortedSet sm = set.subSet(two, four); in testSubSetContents() 598 assertFalse(set.contains(two)); in testSubSetContents() 599 assertEquals(4, set.size()); in testSubSetContents() 605 assertEquals(3, set.size()); in testSubSetContents() 609 ConcurrentSkipListSet set = set5(); in testSubSetContents2() local 610 SortedSet sm = set.subSet(two, three); in testSubSetContents2() 627 assertFalse(set.contains(two)); in testSubSetContents2() 628 assertEquals(4, set.size()); in testSubSetContents2() 632 assertEquals(4, set.size()); in testSubSetContents2() [all …]
|
D | TreeSetTest.java | 574 TreeSet set = set5(); in testSubSetContents() local 575 SortedSet sm = set.subSet(two, four); in testSubSetContents() 594 assertFalse(set.contains(two)); in testSubSetContents() 595 assertEquals(4, set.size()); in testSubSetContents() 601 assertEquals(3, set.size()); in testSubSetContents() 605 TreeSet set = set5(); in testSubSetContents2() local 606 SortedSet sm = set.subSet(two, three); in testSubSetContents2() 623 assertFalse(set.contains(two)); in testSubSetContents2() 624 assertEquals(4, set.size()); in testSubSetContents2() 628 assertEquals(4, set.size()); in testSubSetContents2() [all …]
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | ConcurrentSkipListSetTest.java | 548 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 …]
|
D | TreeSetTest.java | 551 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 …]
|
/libcore/ojluni/src/main/java/java/util/ |
D | BitSet.java | 445 public void set(int bitIndex) { in set() method in BitSet 465 public void set(int bitIndex, boolean value) { in set() method in BitSet 467 set(bitIndex); in set() 483 public void set(int fromIndex, int toIndex) { in set() method in BitSet 527 public void set(int fromIndex, int toIndex, boolean value) { in set() method in BitSet 529 set(fromIndex, toIndex); in set() 886 public boolean intersects(BitSet set) { in intersects() argument 887 for (int i = Math.min(wordsInUse, set.wordsInUse) - 1; i >= 0; i--) in intersects() 888 if ((words[i] & set.words[i]) != 0) in intersects() 915 public void and(BitSet set) { in and() argument [all …]
|
/libcore/ojluni/src/main/java/sun/security/provider/certpath/ |
D | PolicyNodeImpl.java | 303 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 …]
|