/libcore/luni/src/test/java/libcore/java/util/ |
H A D | OptionalIntTest.java | 31 assertSame(OptionalInt.empty(), OptionalInt.empty()); 38 OptionalInt.empty().getAsInt(); 46 assertFalse(OptionalInt.empty().isPresent()); 51 OptionalInt.empty().ifPresent(alwaysFails); 60 assertEquals(57, OptionalInt.empty().orElse(57)); 69 assertEquals(57, OptionalInt.empty().orElseGet(supplies57)); 79 OptionalInt.empty().orElseThrow(barSupplier); 87 assertEquals(OptionalInt.empty(), OptionalInt.empty()); [all...] |
H A D | OptionalLongTest.java | 31 assertSame(OptionalLong.empty(), OptionalLong.empty()); 38 OptionalLong.empty().getAsLong(); 46 assertFalse(OptionalLong.empty().isPresent()); 51 OptionalLong.empty().ifPresent(alwaysFails); 60 assertEquals(57, OptionalLong.empty().orElse(57)); 69 assertEquals(57, OptionalLong.empty().orElseGet(supplies57)); 79 OptionalLong.empty().orElseThrow(barSupplier); 87 assertEquals(OptionalLong.empty(), OptionalLong.empty()); [all...] |
H A D | OptionalTest.java | 33 // empty() is a singleton instance. 34 assertSame(Optional.<Integer>empty(), Optional.<String>empty()); 35 assertSame(Optional.<String>empty(), Optional.<String>empty()); 37 // Note that we assert here that the empty() optional is the same instance 40 assertSame(Optional.<String>empty(), Optional.ofNullable(null)); 44 Optional<String> empty = Optional.empty(); 47 empty [all...] |
H A D | OptionalDoubleTest.java | 33 assertSame(OptionalDouble.empty(), OptionalDouble.empty()); 40 OptionalDouble.empty().getAsDouble(); 48 assertFalse(OptionalDouble.empty().isPresent()); 53 OptionalDouble.empty().ifPresent(alwaysFails); 62 assertEquals(57.0, OptionalDouble.empty().orElse(57.0)); 71 assertEquals(57.0, OptionalDouble.empty().orElseGet(supplies57)); 81 OptionalDouble.empty().orElseThrow(barSupplier); 89 assertEquals(OptionalDouble.empty(), OptionalDouble.empty()); [all...] |
H A D | SpliteratorsTest.java | 37 Spliterator.OfInt empty = Spliterators.emptyIntSpliterator(); 38 assertNull(empty.trySplit()); 39 assertEquals(0, empty.estimateSize()); 40 assertEquals(0, empty.getExactSizeIfKnown()); 44 empty.tryAdvance(alwaysFails); 45 empty.tryAdvance(alwaysFailsBoxed); 47 empty.forEachRemaining(alwaysFails); 48 empty.forEachRemaining(alwaysFailsBoxed); 50 assertEquals(Spliterator.SIZED | Spliterator.SUBSIZED, empty.characteristics()); 54 Spliterator<Object> empty [all...] |
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
H A D | MinMaxTest.java | 68 assertEquals(IntStream.empty().min(), OptionalInt.empty()); 69 assertEquals(IntStream.empty().max(), OptionalInt.empty()); 81 assertEquals(LongStream.empty().min(), OptionalLong.empty()); 82 assertEquals(LongStream.empty().max(), OptionalLong.empty()); 94 assertEquals(DoubleStream.empty().min(), OptionalDouble.empty()); [all...] |
H A D | ConcatTest.java | 56 List<Integer> empty = new LinkedList<>(); // To be ordered 57 assertTrue(empty.isEmpty()); 73 { "empty something", empty, part1, part1 }, 74 { "something empty", part1, empty, part1 }, 75 { "empty empty", empty, empty, empt [all...] |
H A D | ExplodeOpTest.java | 79 result = exerciseOps(data, s-> s.flatMap(e -> Stream.empty())); 95 result = exerciseOps(data, s -> s.flatMap(i -> IntStream.empty())); 110 result = exerciseOps(data, s -> LongStream.empty()); 125 result = exerciseOps(data, s -> DoubleStream.empty());
|
/libcore/luni/src/test/java/libcore/javax/net/ssl/ |
H A D | KeyManagerFactoryTest.java | 129 private void test_KeyManagerFactory_getKeyManagers(KeyManagerFactory kmf, boolean empty) argument 137 test_X509KeyManager((X509KeyManager) keyManager, empty, kmf.getAlgorithm()); 160 private void test_X509KeyManager(X509KeyManager km, boolean empty, String algorithm) argument 165 if (empty || keyType == null || keyType.isEmpty()) { 171 test_X509KeyManager_alias(km, alias, keyType, false, empty); 176 if (empty || keyType == null || keyType.isEmpty()) { 182 test_X509KeyManager_alias(km, alias, keyType, false, empty); 187 test_X509KeyManager_alias(km, a, null, true, empty); 192 test_X509KeyManager_alias(km, alias, keyType, false, empty); 196 test_X509KeyManager_alias(km, alias, keyType, false, empty); 203 test_X509ExtendedKeyManager(X509ExtendedKeyManager km, boolean empty, String algorithm) argument 219 test_X509KeyManager_alias(X509KeyManager km, String alias, String keyType, boolean many, boolean empty) argument [all...] |
/libcore/luni/src/main/native/ |
H A D | canonicalize_path.cpp | 63 while (!left.empty()) { 72 if (nextPathComponent.empty()) { 111 if (!left.empty()) {
|
/libcore/ojluni/src/main/java/java/util/ |
H A D | Optional.java | 47 * Common instance for {@code empty()}. 57 * Constructs an empty instance. 59 * @implNote Generally only one empty instance, {@link Optional#EMPTY}, 67 * Returns an empty {@code Optional} instance. No value is present for this 71 * is empty by comparing with {@code ==} against instances returned by 72 * {@code Option.empty()}. There is no guarantee that it is a singleton. 76 * @return an empty {@code Optional} 78 public static<T> Optional<T> empty() { method in class:Optional 108 * otherwise returns an empty {@code Optional}. 113 * is non-null, otherwise an empty { [all...] |
H A D | Stack.java | 34 * for whether the stack is <tt>empty</tt>, and a method to <tt>search</tt> 51 * Creates an empty Stack. 78 * @throws EmptyStackException if this stack is empty. 96 * @throws EmptyStackException if this stack is empty. 107 * Tests if this stack is empty. 112 public boolean empty() { method in class:Stack
|
H A D | OptionalDouble.java | 46 * Common instance for {@code empty()}. 57 * Construct an empty instance. 59 * @implNote generally only one empty instance, {@link OptionalDouble#EMPTY}, 68 * Returns an empty {@code OptionalDouble} instance. No value is present for this 72 * is empty by comparing with {@code ==} against instances returned by 73 * {@code Option.empty()}. There is no guarantee that it is a singleton. 76 * @return an empty {@code OptionalDouble}. 78 public static OptionalDouble empty() { method in class:OptionalDouble 168 * @apiNote A method reference to the exception constructor with an empty 231 * Returns a non-empty strin [all...] |
H A D | OptionalInt.java | 46 * Common instance for {@code empty()}. 57 * Construct an empty instance. 59 * @implNote Generally only one empty instance, {@link OptionalInt#EMPTY}, 68 * Returns an empty {@code OptionalInt} instance. No value is present for this 72 * is empty by comparing with {@code ==} against instances returned by 73 * {@code Option.empty()}. There is no guarantee that it is a singleton. 76 * @return an empty {@code OptionalInt} 78 public static OptionalInt empty() { method in class:OptionalInt 169 * @apiNote A method reference to the exception constructor with an empty 232 * Returns a non-empty strin [all...] |
H A D | OptionalLong.java | 46 * Common instance for {@code empty()}. 57 * Construct an empty instance. 59 * @implNote generally only one empty instance, {@link OptionalLong#EMPTY}, 68 * Returns an empty {@code OptionalLong} instance. No value is present for this 72 * is empty by comparing with {@code ==} against instances returned by 73 * {@code Option.empty()}. There is no guarantee that it is a singleton. 76 * @return an empty {@code OptionalLong}. 78 public static OptionalLong empty() { method in class:OptionalLong 168 * @apiNote A method reference to the exception constructor with an empty 231 * Returns a non-empty strin [all...] |
/libcore/ojluni/src/main/java/java/util/stream/ |
H A D | ReduceOps.java | 109 private boolean empty; 113 empty = true; 119 if (empty) { 120 empty = false; 129 return empty ? Optional.empty() : Optional.of(state); 134 if (!other.empty) 291 private boolean empty; 295 empty = true; 301 if (empty) { [all...] |
H A D | FindOps.java | 58 return new FindOp<>(mustFindFirst, StreamShape.REFERENCE, Optional.empty(), 70 return new FindOp<>(mustFindFirst, StreamShape.INT_VALUE, OptionalInt.empty(), 82 return new FindOp<>(mustFindFirst, StreamShape.LONG_VALUE, OptionalLong.empty(), 94 return new FindOp<>(mustFindFirst, StreamShape.DOUBLE_VALUE, OptionalDouble.empty(),
|
/libcore/include/ |
H A D | LocalArray.h | 59 bool empty() { return mSize == 0; } function in class:LocalArray
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/org/xml/sax/helpers/ |
H A D | AttributeListImplTest.java | 27 private AttributeListImpl empty = new AttributeListImpl(); field in class:AttributeListImplTest 39 assertEquals(0, empty.getLength()); 45 AttributeListImpl ai = new AttributeListImpl(empty); 67 attrs.setAttributeList(empty); 134 AttributeListImpl ai = new AttributeListImpl(empty);
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
H A D | StackTest.java | 36 * java.util.Stack#empty() 39 // Test for method boolean java.util.Stack.empty() 40 assertTrue("New stack answers non-empty", s.empty()); 42 assertTrue("Stack should not be empty but answers empty", !s.empty()); 44 assertTrue("Stack should be empty but answers non-empty", s.empty()); [all...] |
/libcore/jsr166-tests/src/test/java/jsr166/ |
H A D | ConcurrentHashMapTest.java | 295 ConcurrentHashMap empty = new ConcurrentHashMap(); 297 assertNull(empty.get("anything")); 301 * isEmpty is true of empty map and false for non-empty 304 ConcurrentHashMap empty = new ConcurrentHashMap(); 306 assertTrue(empty.isEmpty()); 418 ConcurrentHashMap empty = new ConcurrentHashMap(); 420 empty.putAll(map); 421 assertEquals(5, empty.size()); 422 assertTrue(empty [all...] |
H A D | TreeSubMapTest.java | 126 NavigableMap empty = map0(); 127 assertNull(empty.get(one)); 131 * isEmpty is true of empty map and false for non-empty 134 NavigableMap empty = map0(); 136 assertTrue(empty.isEmpty()); 223 NavigableMap empty = map0(); 225 empty.putAll(map); 226 assertEquals(5, empty.size()); 227 assertTrue(empty [all...] |
H A D | CopyOnWriteArraySetTest.java | 55 * Default-constructed set is empty 210 * isEmpty is true when empty, else false 222 Collection empty = new CopyOnWriteArraySet(); 223 assertFalse(empty.iterator().hasNext()); 225 empty.iterator().next(); 244 * iterator of empty collection has no elements 301 Collection empty = new CopyOnWriteArraySet(); 304 assertEquals(0, empty.size()); 331 Collection empty = new CopyOnWriteArraySet(); 335 assertSame(a, empty [all...] |
H A D | ConcurrentSkipListSubMapTest.java | 127 ConcurrentNavigableMap empty = map0(); 128 assertNull(empty.get(one)); 132 * isEmpty is true of empty map and false for non-empty 135 ConcurrentNavigableMap empty = map0(); 137 assertTrue(empty.isEmpty()); 266 ConcurrentNavigableMap empty = map0(); 268 empty.putAll(map); 269 assertEquals(5, empty.size()); 270 assertTrue(empty [all...] |
/libcore/json/src/main/java/org/json/ |
H A D | JSONStringer.java | 174 JSONStringer open(Scope empty, String openBracket) throws JSONException { argument 179 stack.add(empty); 188 JSONStringer close(Scope empty, Scope nonempty, String closeBracket) throws JSONException { argument 190 if (context != nonempty && context != empty) {
|