Searched refs:set (Results 1 - 25 of 308) sorted by relevance

1234567891011>>

/libcore/support/src/test/java/tests/support/
H A DSupport_SetTest.java24 Set<Integer> set; // must contain only the Integers 0 to 99 field in class:Support_SetTest
32 set = s;
38 assertTrue("Set Test - Adding a duplicate element changed the set",
39 !set.add(new Integer(50)));
40 assertTrue("Set Test - Removing an element did not change the set", set
44 !set.contains(new Integer(50)));
45 set.add(new Integer(50));
46 new Support_CollectionTest("", set).runTest();
/libcore/luni/src/test/java/libcore/java/util/
H A DTreeSetTest.java30 TreeSet<String> set = new TreeSet<String>();
31 new SerializationTester<TreeSet<String>>(set, s).test();
39 TreeSet<String> set = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
40 set.add("a");
41 set.add("b");
42 new SerializationTester<NavigableSet<String>>(set, s) {
54 TreeSet<String> set = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
55 set.add("a");
56 set.add("b");
57 set
[all...]
/libcore/ojluni/src/main/java/jdk/net/
H A DSockets.java41 * Defines static methods to set and get socket options defined by the
44 * {@link java.net.DatagramSocket} can be set this way, as well as additional
48 * the complete set of options available (per socket type) on the
52 * may require a security permission before being set or get.
166 * @throws SecurityException if a security manager is set and the
194 * @throws SecurityException if a security manager is set and the
226 * @throws SecurityException if a security manager is set and the
254 * @throws SecurityException if a security manager is set and the
285 * @throws SecurityException if a security manager is set and the
314 * @throws SecurityException if a security manager is set an
[all...]
/libcore/ojluni/src/main/java/sun/util/
H A DResourceBundleEnumeration.java39 Set<String> set; field in class:ResourceBundleEnumeration
45 * @param set an set providing some elements of the enumeration
49 public ResourceBundleEnumeration(Set<String> set, Enumeration<String> enumeration) { argument
50 this.set = set;
51 this.iterator = set.iterator();
64 if (set.contains(next)) {
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
H A DCalendarTest.java37 * java.util.Calendar#set(int, int)
40 // Test for correct result defined by the last set field
44 cal.set(Calendar.YEAR, 2002);
49 cal.set(Calendar.YEAR, 2002);
50 cal.set(Calendar.MONTH, Calendar.MARCH);
55 cal.set(Calendar.YEAR, 2002);
56 cal.set(Calendar.DATE, 24);
60 cal.set(Calendar.MONTH, Calendar.OCTOBER);
61 cal.set(Calendar.DATE, 31);
62 cal.set(Calenda
[all...]
H A DBitSetTest.java71 bs.set(128);
72 assertFalse("Different sized BitSet with higher bit set returned true",
76 "Different sized BitSet with higher bits not set returned false",
85 bs.set(10);
98 bs.set(0, bs.size() - 1); // ensure all bits are 1's
99 bs.set(bs.size() - 1);
111 // Check to see all other bits are still set
141 bs.set(25);
166 bitset.set(i);
174 bs.set(
[all...]
H A DEnumMapTest.java341 Set set = enumSizeMap.entrySet();
344 assertSame("Should be same", set1, set);
346 set.add(mockEntry);
352 assertTrue("Returned false for contained object", set
355 assertFalse("Returned true for uncontained object", set
357 assertFalse("Returned true for uncontained object", set
360 assertFalse("Returned true for uncontained object", set
362 assertFalse("Returned true for uncontained object", set
366 assertTrue("Returned false for contained object", set
368 assertTrue("Returned false when the object can be removed", set
[all...]
H A DEnumSetTest.java120 EnumSet<HugeEnumCount> set;
125 set = EnumSet.range(HugeEnumCount.NO1, HugeEnumCount.NO65);
126 array = set.toArray();
127 for (HugeEnumCount count : set) {
133 set = EnumSet.range(HugeEnumCount.NO1, HugeEnumCount.NO130);
134 array = set.toArray();
135 for (HugeEnumCount count : set) {
141 EnumSet<HugeEnumCount> set = EnumSet.noneOf(HugeEnumCount.class);
142 set.add(HugeEnumCount.NO64);
143 set
[all...]
/libcore/ojluni/src/test/java/util/stream/boottest/java/util/stream/
H A DStreamOpFlagsTest.java59 sourceFlags |= flags.get(f).set();
70 int sourceFlags = f.set();
74 opsFlags = combineOpFlags(f.set(), opsFlags);
81 // Clear when source not set
89 // Clear when source set
90 sourceFlags = f.set();
100 // Set when source not set
105 opsFlags = combineOpFlags(f.set(), opsFlags);
106 assertEquals(f.set(), toStreamFlags(opsFlags));
108 // Set when source set
[all...]
/libcore/ojluni/src/main/java/sun/misc/
H A DJavaIOFileDescriptorAccess.java34 public void set(FileDescriptor obj, int fd); method in interface:JavaIOFileDescriptorAccess
/libcore/ojluni/src/main/java/java/util/stream/
H A DStreamOpFlag.java111 * {@link #TERMINAL_OP_MASK} can be ANDed with a bit set of stream flags to
120 * flag bits are combined into an {@code int} bit set. <em>Stream flags</em>
121 * are a unioned bit set constructed by ORing the enum characteristic values of
122 * {@link #set()} (or, more commonly, ORing the corresponding static named
124 * bit set constructed by ORing the enum characteristic values of {@link #set()}
137 * {@link java.util.Spliterator#SIZED}. A spliterator characteristics bit set
140 * {@link #toCharacteristics(int)}. (The bit set
141 * {@link #SPLITERATOR_CHARACTERISTICS_MASK} is used to AND with a bit set to
142 * produce a valid spliterator characteristics bit set tha
384 private static MaskBuilder set(Type t) { method in class:StreamOpFlag
400 MaskBuilder set(Type t) { method in class:StreamOpFlag.MaskBuilder
434 private final int set; field in class:StreamOpFlag
461 public int set() { method in class:StreamOpFlag
[all...]
/libcore/ojluni/src/main/java/sun/security/x509/
H A DKeyUsageExtension.java53 * get, set, delete methods of Certificate, x509 type.
81 * Check if bit is set.
93 private void set(int position, boolean val) { method in class:KeyUsageExtension
105 * is set to true.
107 * @param bitString the bits to be set for the extension.
119 * is set to true.
121 * @param bitString the bits to be set for the extension.
132 * is set to true.
134 * @param bitString the bits to be set for the extension.
188 public void set(Strin method in class:KeyUsageExtension
[all...]
/libcore/ojluni/src/main/java/sun/nio/fs/
H A DUtil.java98 HashSet<E> set = new HashSet<>();
100 set.add(e);
102 return set;
111 HashSet<E> set = new HashSet<>(other);
113 set.add(e);
115 return set;
/libcore/jsr166-tests/src/test/java/jsr166/
H A DConcurrentSkipListSetTest.java42 * Returns a new set of given size containing consecutive
59 * Returns a new set of first 5 ints.
74 * A new set has unbounded capacity
488 * iterator of empty set has no elements
527 * A deserialized serialized set has same elements
545 * subSet returns set with keys in requested range
548 ConcurrentSkipListSet set = set5();
549 SortedSet sm = set.subSet(two, four);
568 assertFalse(set.contains(two));
569 assertEquals(4, set
705 populate(NavigableSet<Integer> set, int limit, BitSet bs) argument
712 mutateSet(NavigableSet<Integer> set, int min, int max, BitSet bs) argument
737 mutateSubSet(NavigableSet<Integer> set, int min, int max, BitSet bs) argument
769 put(NavigableSet<Integer> set, int element, BitSet bs) argument
774 remove(NavigableSet<Integer> set, int element, BitSet bs) argument
779 bashSubSet(NavigableSet<Integer> set, int min, int max, boolean ascending, BitSet bs) argument
861 check(NavigableSet<Integer> set, final int min, final int max, final boolean ascending, final BitSet bs) argument
[all...]
H A DTreeSetTest.java47 * Returns a new set of given size containing consecutive
63 * Returns a new set of first 5 ints.
78 * A new set has unbounded capacity
493 * iterator of empty set has no elements
530 * A deserialized serialized set has same elements
548 * subSet returns set with keys in requested range
551 TreeSet set = set5();
552 SortedSet sm = set.subSet(two, four);
571 assertFalse(set.contains(two));
572 assertEquals(4, set
709 populate(NavigableSet<Integer> set, int limit) argument
716 mutateSet(NavigableSet<Integer> set, int min, int max) argument
741 mutateSubSet(NavigableSet<Integer> set, int min, int max) argument
772 put(NavigableSet<Integer> set, int element) argument
777 remove(NavigableSet<Integer> set, int element) argument
782 bashSubSet(NavigableSet<Integer> set, int min, int max, boolean ascending) argument
863 check(NavigableSet<Integer> set, final int min, final int max, final boolean ascending) argument
[all...]
H A DAtomicIntegerArrayTest.java61 * get and set for out of bound indices throw IndexOutOfBoundsException
71 aa.set(index, 1);
98 * get returns the last value set at index
103 aa.set(i, 1);
105 aa.set(i, 2);
107 aa.set(i, -3);
133 aa.set(i, 1);
150 a.set(0, 1);
171 aa.set(i, 1);
186 aa.set(
[all...]
/libcore/benchmarks/src/benchmarks/regression/
H A DBitSetBenchmark.java41 bs.set(bs.size() - 1);
61 bs.set(i % size);
67 bs.set(i % size, true);
73 bs.set(i % size, false);
/libcore/ojluni/src/main/java/java/util/
H A DListIterator.java43 * Note that the {@link #remove} and {@link #set(Object)} methods are
161 * @throws UnsupportedOperationException if the {@code set} operation
172 void set(E e); method in interface:ListIterator
H A DBitSet.java37 * component of the bit set has a {@code boolean} value. The
39 * Individual indexed bits can be examined, set, or cleared. One
44 * <p>By default, all bits in the set initially have the value
47 * <p>Every bit set has a current size, which is the number of bits
48 * of space currently in use by the bit set. Note that the size is
49 * related to the implementation of a bit set, so it may change with
50 * implementation. The length of a bit set relates to logical length
51 * of a bit set and is defined independently of implementation.
125 * Sets the field wordsInUse to the logical size in words of the bit set.
140 * Creates a new bit set
442 public void set(int bitIndex) { method in class:BitSet
462 public void set(int bitIndex, boolean value) { method in class:BitSet
480 public void set(int fromIndex, int toIndex) { method in class:BitSet
524 public void set(int fromIndex, int toIndex, boolean value) { method in class:BitSet
883 intersects(BitSet set) argument
912 and(BitSet set) argument
936 or(BitSet set) argument
975 xor(BitSet set) argument
1005 andNot(BitSet set) argument
[all...]
/libcore/ojluni/src/main/java/sun/security/provider/certpath/
H A DPolicyNodeImpl.java222 * Adds an expectedPolicy to the expected policy set.
223 * If this is the original expected policy set initialized
224 * by the constructor, then the expected policy set is cleared
303 Set<PolicyNodeImpl> set = new HashSet<>();
304 getPolicyNodes(depth, set);
305 return set;
309 * Add all nodes at depth depth to set and return the Set.
312 private void getPolicyNodes(int depth, Set<PolicyNodeImpl> set) { argument
315 set.add(this);
318 node.getPolicyNodes(depth, set);
[all...]
/libcore/luni/src/test/java/libcore/java/sql/
H A DOldResultSetGetterTests.java839 * is thrown: stale result set.
928 cal.set(Calendar.HOUR_OF_DAY, 12);
929 cal.set(Calendar.MINUTE, 35);
930 cal.set(Calendar.SECOND, 45);
931 cal.set(Calendar.MILLISECOND, 0);
932 // set with calendar value (correct init time: since epoch)
939 cal2.set(Calendar.YEAR, 2007);
940 cal2.set(Calendar.MONTH, Calendar.OCTOBER);
941 cal2.set(Calendar.DATE, 9);
942 cal2.set(Calenda
[all...]
/libcore/luni/src/test/java/libcore/java/util/function/
H A DDoublePredicateTest.java37 x -> { alwaysTrueInvoked.set(true); assertEquals(x, arg); return true; };
39 x -> { alwaysTrue2Invoked.set(true); assertEquals(x, arg); return true; };
41 x -> { alwaysFalseInvoked.set(true); assertEquals(x, arg); return false; };
43 x -> { alwaysFalse2Invoked.set(true); assertEquals(x, arg); return false; };
94 x -> { alwaysTrueInvoked.set(true); assertEquals(x, arg); return true; };
96 x -> { alwaysTrue2Invoked.set(true); assertEquals(x, arg); return true; };
98 x -> { alwaysFalseInvoked.set(true); assertEquals(x, arg); return false; };
100 x -> { alwaysFalse2Invoked.set(true); assertEquals(x, arg); return false; };
133 toReset.set(false);
H A DIntPredicateTest.java37 x -> { alwaysTrueInvoked.set(true); assertEquals(x, arg); return true; };
39 x -> { alwaysTrue2Invoked.set(true); assertEquals(x, arg); return true; };
41 x -> { alwaysFalseInvoked.set(true); assertEquals(x, arg); return false; };
43 x -> { alwaysFalse2Invoked.set(true); assertEquals(x, arg); return false; };
94 x -> { alwaysTrueInvoked.set(true); assertEquals(x, arg); return true; };
96 x -> { alwaysTrue2Invoked.set(true); assertEquals(x, arg); return true; };
98 x -> { alwaysFalseInvoked.set(true); assertEquals(x, arg); return false; };
100 x -> { alwaysFalse2Invoked.set(true); assertEquals(x, arg); return false; };
133 toReset.set(false);
H A DLongPredicateTest.java34 LongPredicate alwaysTrue = x -> { alwaysTrueInvoked.set(true); return true; };
35 LongPredicate alwaysTrue2 = x -> { alwaysTrue2Invoked.set(true); return true; };
36 LongPredicate alwaysFalse = x -> { alwaysFalseInvoked.set(true); return false; };
37 LongPredicate alwaysFalse2 = x -> { alwaysFalse2Invoked.set(true); return false; };
85 LongPredicate alwaysTrue = x -> { alwaysTrueInvoked.set(true); return true; };
86 LongPredicate alwaysTrue2 = x -> { alwaysTrue2Invoked.set(true); return true; };
87 LongPredicate alwaysFalse = x -> { alwaysFalseInvoked.set(true); return false; };
88 LongPredicate alwaysFalse2 = x -> { alwaysFalse2Invoked.set(true); return false; };
121 toReset.set(false);
H A DPredicateTest.java37 x -> { alwaysTrueInvoked.set(true); assertSame(x, arg); return true; };
39 x -> { alwaysTrue2Invoked.set(true); assertSame(x, arg); return true; };
41 x -> { alwaysFalseInvoked.set(true); assertSame(x, arg); return false; };
43 x -> { alwaysFalse2Invoked.set(true); assertSame(x, arg); return false; };
94 x -> { alwaysTrueInvoked.set(true); assertSame(x, arg); return true; };
96 x -> { alwaysTrue2Invoked.set(true); assertSame(x, arg); return true; };
98 x -> { alwaysFalseInvoked.set(true); assertSame(x, arg); return false; };
100 x -> { alwaysFalse2Invoked.set(true); assertSame(x, arg); return false; };
133 toReset.set(false);

Completed in 615 milliseconds

1234567891011>>