/external/guava/guava-tests/test/com/google/common/base/ |
D | OptionalTest.java | 42 Optional<String> optionalName = Optional.absent(); in testAbsent() 47 assertEquals("training", Optional.of("training").get()); in testOf() 52 Optional.of(null); in testOf_null() 59 Optional<String> optionalName = Optional.fromNullable("bob"); in testFromNullable() 65 assertSame(Optional.absent(), Optional.fromNullable(null)); in testFromNullable_null() 69 assertFalse(Optional.absent().isPresent()); in testIsPresent_no() 73 assertTrue(Optional.of("training").isPresent()); in testIsPresent_yes() 77 Optional<String> optional = Optional.absent(); in testGet_absent() 86 assertEquals("training", Optional.of("training").get()); in testGet_present() 90 assertEquals("a", Optional.of("a").or("default")); in testOr_T_present() [all …]
|
/external/guava/guava-gwt/test-super/com/google/common/base/super/com/google/common/base/ |
D | OptionalTest.java | 39 Optional<String> optionalName = Optional.absent(); in testAbsent() 44 assertEquals("training", Optional.of("training").get()); in testOf() 49 Optional.of(null); in testOf_null() 56 Optional<String> optionalName = Optional.fromNullable("bob"); in testFromNullable() 62 assertSame(Optional.absent(), Optional.fromNullable(null)); in testFromNullable_null() 66 assertFalse(Optional.absent().isPresent()); in testIsPresent_no() 70 assertTrue(Optional.of("training").isPresent()); in testIsPresent_yes() 74 Optional<String> optional = Optional.absent(); in testGet_absent() 83 assertEquals("training", Optional.of("training").get()); in testGet_present() 87 assertEquals("a", Optional.of("a").or("default")); in testOr_T_present() [all …]
|
/external/libchrome/base/ |
D | optional_unittest.cc | 175 static_assert(std::is_trivially_destructible<Optional<int>>::value, 179 !std::is_trivially_destructible<Optional<NonTriviallyDestructible>>::value, 182 static_assert(sizeof(Optional<int>) == sizeof(internal::OptionalBase<int>), 188 constexpr Optional<float> o; in TEST() 193 Optional<std::string> o; in TEST() 198 Optional<TestObject> o; in TEST() 205 constexpr Optional<float> first(0.1f); in TEST() 206 constexpr Optional<float> other(first); in TEST() 214 Optional<std::string> first("foo"); in TEST() 215 Optional<std::string> other(first); in TEST() [all …]
|
D | optional.h | 36 class Optional; variable 352 std::is_constructible<T, Optional<U>&>::value || 353 std::is_constructible<T, const Optional<U>&>::value || 354 std::is_constructible<T, Optional<U>&&>::value || 355 std::is_constructible<T, const Optional<U>&&>::value || 356 std::is_convertible<Optional<U>&, T>::value || 357 std::is_convertible<const Optional<U>&, T>::value || 358 std::is_convertible<Optional<U>&&, T>::value || 359 std::is_convertible<const Optional<U>&&, T>::value> {}; 366 std::is_assignable<T&, Optional<U>&>::value || [all …]
|
/external/perfetto/src/base/ |
D | optional_unittest.cc | 192 static_assert(std::is_trivially_destructible<Optional<int>>::value, 196 !std::is_trivially_destructible<Optional<NonTriviallyDestructible>>::value, 199 static_assert(sizeof(Optional<int>) == sizeof(internal::OptionalBase<int>), 205 constexpr Optional<float> o; in TEST() 210 Optional<std::string> o; in TEST() 215 Optional<TestObject> o; in TEST() 222 constexpr Optional<float> first(0.1f); in TEST() 223 constexpr Optional<float> other(first); in TEST() 231 Optional<std::string> first("foo"); in TEST() 232 Optional<std::string> other(first); in TEST() [all …]
|
/external/javaparser/javaparser-core/src/main/java/com/github/javaparser/ast/expr/ |
D | Expression.java | 33 import java.util.Optional; 565 public Optional<AnnotationExpr> toAnnotationExpr() { in toAnnotationExpr() 566 return Optional.empty(); in toAnnotationExpr() 570 public Optional<ArrayAccessExpr> toArrayAccessExpr() { in toArrayAccessExpr() 571 return Optional.empty(); in toArrayAccessExpr() 575 public Optional<ArrayCreationExpr> toArrayCreationExpr() { in toArrayCreationExpr() 576 return Optional.empty(); in toArrayCreationExpr() 580 public Optional<ArrayInitializerExpr> toArrayInitializerExpr() { in toArrayInitializerExpr() 581 return Optional.empty(); in toArrayInitializerExpr() 585 public Optional<AssignExpr> toAssignExpr() { in toAssignExpr() [all …]
|
/external/swiftshader/third_party/llvm-subzero/include/llvm/ADT/ |
D | Optional.h | 29 class Optional { 35 Optional(NoneType) : hasVal(false) {} in Optional() function 36 explicit Optional() : hasVal(false) {} in Optional() function 37 Optional(const T &y) : hasVal(true) { in Optional() function 40 Optional(const Optional &O) : hasVal(O.hasVal) { in Optional() function 45 Optional(T &&y) : hasVal(true) { in Optional() function 48 Optional(Optional<T> &&O) : hasVal(O) { in Optional() function 54 Optional &operator=(T &&y) { 63 Optional &operator=(Optional &&O) { 81 static inline Optional create(const T* y) { in create() [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/include/llvm/ADT/ |
D | Optional.h | 131 template <typename T> class Optional { 137 constexpr Optional() {} 138 constexpr Optional(NoneType) {} 140 Optional(const T &y) : Storage(y) {} 141 Optional(const Optional &O) = default; 143 Optional(T &&y) : Storage(std::forward<T>(y)) {} 144 Optional(Optional &&O) = default; 146 Optional &operator=(T &&y) { 150 Optional &operator=(Optional &&O) = default; 159 static inline Optional create(const T *y) { [all …]
|
/external/javaparser/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/ |
D | Statement.java | 32 import java.util.Optional; 378 public Optional<AssertStmt> toAssertStmt() { in toAssertStmt() 379 return Optional.empty(); in toAssertStmt() 383 public Optional<BlockStmt> toBlockStmt() { in toBlockStmt() 384 return Optional.empty(); in toBlockStmt() 388 public Optional<BreakStmt> toBreakStmt() { in toBreakStmt() 389 return Optional.empty(); in toBreakStmt() 393 public Optional<ContinueStmt> toContinueStmt() { in toContinueStmt() 394 return Optional.empty(); in toContinueStmt() 398 public Optional<DoStmt> toDoStmt() { in toDoStmt() [all …]
|
/external/javaparser/javaparser-core/src/main/java/com/github/javaparser/metamodel/ |
D | JavaParserMetaModel.java | 6 import java.util.Optional; 361 …MetaModel, "comment", com.github.javaparser.ast.comments.Comment.class, Optional.of(commentMetaMod… in initializePropertyMetaModels() 363 …el, "annotations", com.github.javaparser.ast.expr.AnnotationExpr.class, Optional.of(annotationExpr… in initializePropertyMetaModels() 365 …rationMetaModel, "modifiers", com.github.javaparser.ast.Modifier.class, Optional.empty(), false, f… in initializePropertyMetaModels() 367 …tionMetaModel, "name", com.github.javaparser.ast.expr.SimpleName.class, Optional.of(simpleNameMeta… in initializePropertyMetaModels() 369 …etaModel, "parameters", com.github.javaparser.ast.body.Parameter.class, Optional.of(parameterMetaM… in initializePropertyMetaModels() 371 …iverParameter", com.github.javaparser.ast.body.ReceiverParameter.class, Optional.of(receiverParame… in initializePropertyMetaModels() 373 …"thrownExceptions", com.github.javaparser.ast.type.ReferenceType.class, Optional.of(referenceTypeM… in initializePropertyMetaModels() 375 …, "typeParameters", com.github.javaparser.ast.type.TypeParameter.class, Optional.of(typeParameterM… in initializePropertyMetaModels() 377 …el, "annotations", com.github.javaparser.ast.expr.AnnotationExpr.class, Optional.of(annotationExpr… in initializePropertyMetaModels() [all …]
|
/external/llvm/include/llvm/ADT/ |
D | Optional.h | 29 class Optional { 35 Optional(NoneType) : hasVal(false) {} in Optional() function 36 explicit Optional() : hasVal(false) {} in Optional() function 37 Optional(const T &y) : hasVal(true) { in Optional() function 40 Optional(const Optional &O) : hasVal(O.hasVal) { in Optional() function 45 Optional(T &&y) : hasVal(true) { in Optional() function 48 Optional(Optional<T> &&O) : hasVal(O) { in Optional() function 54 Optional &operator=(T &&y) { 63 Optional &operator=(Optional &&O) { 81 static inline Optional create(const T* y) { in create() [all …]
|
/external/pdfium/third_party/base/ |
D | optional.h | 119 class Optional { 123 constexpr Optional() = default; 125 constexpr Optional(nullopt_t) {} 127 Optional(const Optional& other) { 132 Optional(Optional&& other) { 137 constexpr Optional(const T& value) : storage_(value) {} 140 Optional(T&& value) : storage_(std::move(value)) {} 144 explicit Optional(in_place_t, Args&&... args) 147 ~Optional() = default; 149 Optional& operator=(nullopt_t) { [all …]
|
/external/swiftshader/third_party/LLVM/include/llvm/ADT/ |
D | Optional.h | 24 class Optional { 28 explicit Optional() : x(), hasVal(false) {} in Optional() function 29 Optional(const T &y) : x(y), hasVal(true) {} in Optional() function 31 static inline Optional create(const T* y) { in create() 32 return y ? Optional(*y) : Optional(); in create() 35 Optional &operator=(const T &y) { 53 struct simplify_type<const Optional<T> > { 55 static SimpleType getSimplifiedValue(const Optional<T> &Val) { 61 struct simplify_type<Optional<T> > 62 : public simplify_type<const Optional<T> > {}; [all …]
|
/external/v8/src/base/ |
D | optional.h | 122 class Optional { 126 constexpr Optional() {} 128 constexpr Optional(base::nullopt_t) {} // NOLINT(runtime/explicit) 130 Optional(const Optional& other) { 134 Optional(Optional&& other) V8_NOEXCEPT { 138 constexpr Optional(const T& value) // NOLINT(runtime/explicit) 142 Optional(T&& value) // NOLINT(runtime/explicit) 147 explicit Optional(base::in_place_t, Args&&... args) 150 ~Optional() = default; 152 Optional& operator=(base::nullopt_t) { [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/include/llvm/DebugInfo/DWARF/ |
D | DWARFFormValue.h | 99 Optional<uint64_t> getAsReference() const; 100 Optional<uint64_t> getAsUnsignedConstant() const; 101 Optional<int64_t> getAsSignedConstant() const; 102 Optional<const char *> getAsCString() const; 103 Optional<uint64_t> getAsAddress() const; 104 Optional<uint64_t> getAsSectionOffset() const; 105 Optional<ArrayRef<uint8_t>> getAsBlock() const; 106 Optional<uint64_t> getAsCStringOffset() const; 107 Optional<uint64_t> getAsReferenceUVal() const; 148 inline Optional<const char *> toString(const Optional<DWARFFormValue> &V) { in toString() [all …]
|
/external/perfetto/include/perfetto/base/ |
D | optional.h | 49 class Optional; variable 331 std::is_constructible<T, Optional<U>&>::value || 332 std::is_constructible<T, const Optional<U>&>::value || 333 std::is_constructible<T, Optional<U>&&>::value || 334 std::is_constructible<T, const Optional<U>&&>::value || 335 std::is_convertible<Optional<U>&, T>::value || 336 std::is_convertible<const Optional<U>&, T>::value || 337 std::is_convertible<Optional<U>&&, T>::value || 338 std::is_convertible<const Optional<U>&&, T>::value> {}; 345 std::is_assignable<T&, Optional<U>&>::value || [all …]
|
/external/guava/guava-tests/benchmark/com/google/common/collect/ |
D | BinaryTreeTraverserBenchmark.java | 20 import com.google.common.base.Optional; 35 final Optional<BinaryNode> left; 36 final Optional<BinaryNode> right; 38 BinaryNode(int x, Optional<BinaryNode> left, Optional<BinaryNode> right) { in BinaryNode() 48 Optional<BinaryNode> createTree(int size, Random rng) { in createTree() 50 return Optional.absent(); in createTree() 54 return Optional.of(new BinaryNode( in createTree() 61 Optional<BinaryNode> createTree(int size, Random rng) { in createTree() 62 Optional<BinaryNode> root = Optional.absent(); in createTree() 64 root = Optional.of(new BinaryNode(rng.nextInt(), root, Optional.<BinaryNode>absent())); in createTree() [all …]
|
/external/webrtc/webrtc/base/ |
D | optional.h | 62 class Optional final { 65 Optional() : has_value_(false) {} in Optional() function 68 explicit Optional(const T& val) : value_(val), has_value_(true) {} in Optional() function 69 explicit Optional(T&& val) : value_(std::move(val)), has_value_(true) {} in Optional() function 73 Optional(const Optional&) = default; 74 Optional(Optional&& m) in Optional() function 79 Optional& operator=(const Optional&) = default; 80 Optional& operator=(Optional&& m) { 86 friend void swap(Optional& m1, Optional& m2) { in swap() 121 friend bool operator==(const Optional& m1, const Optional& m2) { [all …]
|
D | optional_unittest.cc | 124 Optional<Logger> x; in TEST() 133 Optional<Logger> x; in TEST() 147 Optional<Logger> x(a); in TEST() 163 Optional<Logger> x; in TEST() 176 Optional<Logger> x(Logger(17)); in TEST() 194 Optional<Logger> x, y; in TEST() 206 Optional<Logger> x(Logger(17)); in TEST() 207 Optional<Logger> y; in TEST() 223 Optional<Logger> x; in TEST() 224 Optional<Logger> y(Logger(17)); in TEST() [all …]
|
/external/clang/include/clang/StaticAnalyzer/Core/ |
D | AnalyzerOptions.h | 205 Optional<bool> IncludeTemporaryDtorsInCFG; 208 Optional<bool> InlineCXXStandardLibrary; 211 Optional<bool> InlineTemplateFunctions; 214 Optional<bool> InlineCXXAllocator; 217 Optional<bool> InlineCXXContainerMethods; 220 Optional<bool> InlineCXXSharedPtrDtor; 223 Optional<bool> ObjCInliningMode; 227 Optional<unsigned> AlwaysInlineSize; 230 Optional<bool> SuppressNullReturnPaths; 233 Optional<unsigned> MaxInlinableSize; [all …]
|
/external/javaparser/javaparser-symbol-solver-testing/src/test/test_sourcecode/javaparser_new_src/javaparser-core/com/github/javaparser/ |
D | ParseResult.java | 6 import java.util.Optional; 17 private final Optional<T> result; 19 private final Optional<List<Token>> tokens; 20 private final Optional<CommentsCollection> commentsCollection; 28 …ParseResult(Optional<T> result, List<Problem> problems, Optional<List<Token>> tokens, Optional<Com… in ParseResult() 39 …this(Optional.empty(), singletonList(new Problem(throwable.getMessage(), Optional.empty(), Optiona… in ParseResult() 59 public Optional<List<Token>> getTokens() { in getTokens() 66 public Optional<CommentsCollection> getCommentsCollection() { in getCommentsCollection() 73 public Optional<T> getResult() { in getResult()
|
/external/javaparser/javaparser-core/src/main/java/com/github/javaparser/ast/body/ |
D | BodyDeclaration.java | 37 import java.util.Optional; 286 public Optional<AnnotationDeclaration> toAnnotationDeclaration() { in toAnnotationDeclaration() 287 return Optional.empty(); in toAnnotationDeclaration() 291 public Optional<AnnotationMemberDeclaration> toAnnotationMemberDeclaration() { in toAnnotationMemberDeclaration() 292 return Optional.empty(); in toAnnotationMemberDeclaration() 296 public Optional<CallableDeclaration> toCallableDeclaration() { in toCallableDeclaration() 297 return Optional.empty(); in toCallableDeclaration() 301 public Optional<ClassOrInterfaceDeclaration> toClassOrInterfaceDeclaration() { in toClassOrInterfaceDeclaration() 302 return Optional.empty(); in toClassOrInterfaceDeclaration() 306 public Optional<ConstructorDeclaration> toConstructorDeclaration() { in toConstructorDeclaration() [all …]
|
/external/javaparser/javaparser-symbol-solver-core/src/main/java/com/github/javaparser/symbolsolver/resolution/typeinference/ |
D | Bound.java | 5 import java.util.Optional; 43 public Optional<Instantiation> isAnInstantiation() { in isAnInstantiation() 44 return Optional.empty(); in isAnInstantiation() 57 public Optional<ProperUpperBound> isProperUpperBound() { in isProperUpperBound() 58 return Optional.empty(); in isProperUpperBound() 67 public Optional<ProperLowerBound> isProperLowerBound() { in isProperLowerBound() 68 return Optional.empty(); in isProperLowerBound() 71 Optional<ProperLowerBound> isProperLowerBoundFor(InferenceVariable inferenceVariable) { in isProperLowerBoundFor() 72 Optional<ProperLowerBound> partial = isProperLowerBound(); in isProperLowerBoundFor() 76 return Optional.empty(); in isProperLowerBoundFor() [all …]
|
/external/v8/src/torque/ |
D | torque-parser.cc | 27 base::Optional<std::string> name; 108 ParseResultHolder<base::Optional<std::string>>::id = 135 ParseResultHolder<base::Optional<RangeExpression>>::id = 142 ParseResultHolder<base::Optional<TypeList>>::id = 157 ParseResultHolder<base::Optional<Statement*>>::id = 161 ParseResultHolder<base::Optional<Expression*>>::id = 173 base::Optional<ParseResult> AddGlobalDeclaration( in AddGlobalDeclaration() 186 base::Optional<ParseResult> MakeCall(ParseResultIterator* child_results) { in MakeCall() 196 base::Optional<ParseResult> MakeBinaryOperator( in MakeBinaryOperator() 207 base::Optional<ParseResult> MakeUnaryOperator( in MakeUnaryOperator() [all …]
|
/external/javaparser/javaparser-core/src/main/java/com/github/javaparser/ast/type/ |
D | Type.java | 41 import java.util.Optional; 304 public Optional<ArrayType> toArrayType() { in toArrayType() 305 return Optional.empty(); in toArrayType() 309 public Optional<ClassOrInterfaceType> toClassOrInterfaceType() { in toClassOrInterfaceType() 310 return Optional.empty(); in toClassOrInterfaceType() 314 public Optional<IntersectionType> toIntersectionType() { in toIntersectionType() 315 return Optional.empty(); in toIntersectionType() 319 public Optional<PrimitiveType> toPrimitiveType() { in toPrimitiveType() 320 return Optional.empty(); in toPrimitiveType() 324 public Optional<ReferenceType> toReferenceType() { in toReferenceType() [all …]
|