Home
last modified time | relevance | path

Searched refs:Optional (Results 1 – 25 of 366) sorted by relevance

12345678910>>...15

/external/guava/guava-tests/test/com/google/common/base/
DOptionalTest.java41 Optional<String> optionalName = Optional.absent(); in testAbsent()
46 assertEquals("training", Optional.of("training").get()); in testOf()
51 Optional.of(null); in testOf_null()
58 Optional<String> optionalName = Optional.fromNullable("bob"); in testFromNullable()
64 assertSame(Optional.absent(), Optional.fromNullable(null)); in testFromNullable_null()
68 assertFalse(Optional.absent().isPresent()); in testIsPresent_no()
72 assertTrue(Optional.of("training").isPresent()); in testIsPresent_yes()
76 Optional<String> optional = Optional.absent(); in testGet_absent()
85 assertEquals("training", Optional.of("training").get()); in testGet_present()
89 assertEquals("a", Optional.of("a").or("default")); in testOr_T_present()
[all …]
/external/llvm/include/llvm/ADT/
DOptional.h28 class Optional {
32 Optional(NoneType) : hasVal(false) {} in Optional() function
33 explicit Optional() : hasVal(false) {} in Optional() function
34 Optional(const T &y) : hasVal(true) { in Optional() function
37 Optional(const Optional &O) : hasVal(O.hasVal) { in Optional() function
42 Optional(T &&y) : hasVal(true) { in Optional() function
45 Optional(Optional<T> &&O) : hasVal(O) { in Optional() function
51 Optional &operator=(T &&y) {
60 Optional &operator=(Optional &&O) {
70 static inline Optional create(const T* y) { in create()
[all …]
/external/clang/include/clang/StaticAnalyzer/Core/
DAnalyzerOptions.h194 Optional<bool> IncludeTemporaryDtorsInCFG;
197 Optional<bool> InlineCXXStandardLibrary;
200 Optional<bool> InlineTemplateFunctions;
203 Optional<bool> InlineCXXAllocator;
206 Optional<bool> InlineCXXContainerMethods;
209 Optional<bool> InlineCXXSharedPtrDtor;
212 Optional<bool> ObjCInliningMode;
216 Optional<unsigned> AlwaysInlineSize;
219 Optional<bool> SuppressNullReturnPaths;
222 Optional<unsigned> MaxInlinableSize;
[all …]
/external/guava/guava/src/com/google/common/base/
DOptional.java71 public abstract class Optional<T> implements Serializable { class
76 public static <T> Optional<T> absent() { in absent()
77 return (Optional<T>) Absent.INSTANCE; in absent()
83 public static <T> Optional<T> of(T reference) { in of()
91 public static <T> Optional<T> fromNullable(@Nullable T nullableReference) { in fromNullable()
93 ? Optional.<T>absent() in fromNullable()
97 private Optional() {} in Optional() method in Optional
124 public abstract Optional<T> or(Optional<? extends T> secondChoice); in or()
175 public static <T> Iterable<T> presentInstances(final Iterable<Optional<T>> optionals) { in presentInstances()
180 private final Iterator<Optional<T>> iterator = checkNotNull(optionals.iterator()); in presentInstances()
[all …]
/external/llvm/unittests/ADT/
DOptionalTest.cpp48 Optional<NonDefaultConstructible> O; in TEST_F()
54 Optional<NonDefaultConstructible> O(NonDefaultConstructible(3)); in TEST_F()
67 Optional<NonDefaultConstructible>(NonDefaultConstructible(3)); in TEST_F()
76 Optional<NonDefaultConstructible> A(NonDefaultConstructible(3)); in TEST_F()
81 Optional<NonDefaultConstructible> B(A); in TEST_F()
95 Optional<NonDefaultConstructible> A(NonDefaultConstructible(3)); in TEST_F()
96 Optional<NonDefaultConstructible> B; in TEST_F()
115 Optional<NonDefaultConstructible> A(NonDefaultConstructible(3)); in TEST_F()
116 Optional<NonDefaultConstructible> B(NonDefaultConstructible(4)); in TEST_F()
135 Optional<NonDefaultConstructible> A; in TEST_F()
[all …]
/external/chromium_org/chrome/browser/
Dio_thread.h93 class Optional {
95 Optional() : set_(false) {} in Optional() function
172 Optional<bool> enable_tcp_fast_open_for_ssl;
174 Optional<size_t> initial_max_spdy_concurrent_streams;
175 Optional<bool> force_spdy_single_domain;
176 Optional<bool> enable_spdy_compression;
177 Optional<bool> enable_spdy_ping_based_connection_checking;
178 Optional<net::NextProto> spdy_default_protocol;
180 Optional<string> trusted_spdy_proxy;
181 Optional<bool> force_spdy_over_ssl;
[all …]
/external/chromium_org/chrome/browser/chromeos/system/
Dinput_device_settings.h23 class Optional {
25 Optional() in Optional() function
30 Optional& operator=(const Optional& other) {
55 bool Update(const Optional& update) { in Update()
109 internal::Optional<int> sensitivity_;
110 internal::Optional<bool> tap_to_click_;
111 internal::Optional<bool> three_finger_click_;
112 internal::Optional<bool> tap_dragging_;
113 internal::Optional<bool> natural_scroll_;
140 internal::Optional<int> sensitivity_;
[all …]
/external/chromium_org/mojo/nacl/generator/
Dinterface.py13 f.Param('options').InStruct('MojoCreateSharedBufferOptions').Optional()
19 f.Param('options').InStruct('MojoDuplicateBufferHandleOptions').Optional()
33 f.Param('options').InStruct('MojoCreateDataPipeOptions').Optional()
86 f.Param('options').InStruct('MojoCreateMessagePipeOptions').Optional()
92 f.Param('bytes').InArray('void', 'num_bytes').Optional()
94 f.Param('handles').InArray('MojoHandle', 'num_handles').Optional()
100 f.Param('bytes').OutArray('void', 'num_bytes').Optional()
101 f.Param('num_bytes').InOut('uint32_t').Optional()
102 f.Param('handles').OutArray('MojoHandle', 'num_handles').Optional()
103 f.Param('num_handles').InOut('uint32_t').Optional()
/external/guava/guava-tests/test/com/google/common/cache/
DCacheBuilderFactory.java19 import com.google.common.base.Optional;
112 private static final Function<Object, Optional<?>> NULLABLE_TO_OPTIONAL =
113 new Function<Object, Optional<?>>() {
114 @Override public Optional<?> apply(@Nullable Object obj) {
115 return Optional.fromNullable(obj);
119 private static final Function<Optional<?>, Object> OPTIONAL_TO_NULLABLE =
120 new Function<Optional<?>, Object>() {
121 @Override public Object apply(Optional<?> optional) {
134 List<Set<Optional<?>>> optionalSets = Lists.newArrayListWithExpectedSize(sets.length);
136 Set<Optional<?>> optionalSet =
[all …]
/external/guava/guava/src/com/google/common/collect/
DBstInOrderPath.java20 import com.google.common.base.Optional;
58 private transient Optional<BstInOrderPath<N>> prevInOrder;
59 private transient Optional<BstInOrderPath<N>> nextInOrder;
68 private Optional<BstInOrderPath<N>> computeNextInOrder(BstSide side) {
75 return Optional.of(path);
82 return Optional.fromNullable(current);
86 private Optional<BstInOrderPath<N>> nextInOrder(BstSide side) {
87 Optional<BstInOrderPath<N>> result;
/external/clang/lib/StaticAnalyzer/Core/
DSVals.cpp33 if (Optional<nonloc::SymbolVal> SV = getAs<nonloc::SymbolVal>()) { in hasConjuredSymbol()
39 if (Optional<loc::MemRegionVal> RV = getAs<loc::MemRegionVal>()) { in hasConjuredSymbol()
52 if (Optional<loc::MemRegionVal> X = getAs<loc::MemRegionVal>()) { in getAsFunctionDecl()
71 if (Optional<nonloc::LocAsInteger> X = getAs<nonloc::LocAsInteger>()) in getAsLocSymbol()
74 if (Optional<loc::MemRegionVal> X = getAs<loc::MemRegionVal>()) { in getAsLocSymbol()
86 Optional<loc::MemRegionVal> X = getAs<loc::MemRegionVal>(); in getLocSymbolInBase()
113 if (Optional<nonloc::SymbolVal> X = getAs<nonloc::SymbolVal>()) in getAsSymbol()
122 if (Optional<nonloc::SymbolVal> X = getAs<nonloc::SymbolVal>()) in getAsSymbolicExpression()
136 if (Optional<loc::MemRegionVal> X = getAs<loc::MemRegionVal>()) in getAsRegion()
139 if (Optional<nonloc::LocAsInteger> X = getAs<nonloc::LocAsInteger>()) in getAsRegion()
[all …]
DBugReporterVisitors.cpp180 if (Optional<CallExitEnd> CEE = Node->getLocationAs<CallExitEnd>()) in addVisitorIfNecessary()
183 if (Optional<StmtPoint> SP = Node->getLocationAs<StmtPoint>()) in addVisitorIfNecessary()
197 Optional<CallExitEnd> CEE = Node->getLocationAs<CallExitEnd>(); in addVisitorIfNecessary()
211 if (Optional<Loc> LValue = RetVal.getAs<Loc>()) in addVisitorIfNecessary()
221 if (Optional<Loc> RetLoc = RetVal.getAs<Loc>()) in addVisitorIfNecessary()
242 Optional<StmtPoint> SP = N->getLocationAs<StmtPoint>(); in visitNodeInitial()
264 Optional<Loc> LValue; in visitNodeInitial()
344 Optional<CallEnter> CE = N->getLocationAs<CallEnter>(); in visitNodeMaybeUnsuppress()
362 Optional<Loc> ArgV = Call->getArgSVal(I).getAs<Loc>(); in visitNodeMaybeUnsuppress()
424 Optional<PostStmt> P = N->getLocationAs<PostStmt>(); in isInitializationOfVar()
[all …]
DRegionStore.cpp203 Optional<SVal> getDirectBinding(const MemRegion *R) const;
207 Optional<SVal> getDefaultBinding(const MemRegion *R) const;
231 Optional<SVal> RegionBindingsRef::getDirectBinding(const MemRegion *R) const { in getDirectBinding()
232 return Optional<SVal>::create(lookup(R, BindingKey::Direct)); in getDirectBinding()
235 Optional<SVal> RegionBindingsRef::getDefaultBinding(const MemRegion *R) const { in getDefaultBinding()
241 return Optional<SVal>::create(lookup(R, BindingKey::Default)); in getDefaultBinding()
444 Optional<RegionBindingsRef> tryBindSmallStruct(RegionBindingsConstRef B,
535 Optional<SVal> getBindingForDerivedDefaultValue(RegionBindingsConstRef B,
827 if (Optional<nonloc::ConcreteInt> ExtentCI = in collectSubRegionBindings()
978 if (Optional<nonloc::LazyCompoundVal> LCS = in VisitBinding()
[all …]
DSValBuilder.cpp81 if (Optional<nonloc::ConcreteInt> CI = val.getAs<nonloc::ConcreteInt>()) { in convertToArrayIndex()
229 Optional<SVal> SValBuilder::getConstantVal(const Expr *E) { in getConstantVal()
274 Optional<SVal> ArrayVal = getConstantVal(CE->getSubExpr()); in getConstantVal()
322 if (Optional<nonloc::ConcreteInt> rInt = RHS.getAs<nonloc::ConcreteInt>()) in makeSymExprValNN()
326 if (Optional<nonloc::ConcreteInt> lInt = LHS.getAs<nonloc::ConcreteInt>()) in makeSymExprValNN()
342 if (Optional<Loc> LV = lhs.getAs<Loc>()) { in evalBinOp()
343 if (Optional<Loc> RV = rhs.getAs<Loc>()) in evalBinOp()
349 if (Optional<Loc> RV = rhs.getAs<Loc>()) { in evalBinOp()
421 if (Optional<Loc> L = val.getAs<Loc>()) in evalCast()
440 if (Optional<nonloc::LocAsInteger> LV = val.getAs<nonloc::LocAsInteger>()) { in evalCast()
/external/llvm/include/llvm/DebugInfo/
DDWARFFormValue.h68 Optional<uint64_t> getAsReference(const DWARFUnit *U) const;
69 Optional<uint64_t> getAsUnsignedConstant() const;
70 Optional<const char *> getAsCString(const DWARFUnit *U) const;
71 Optional<uint64_t> getAsAddress(const DWARFUnit *U) const;
72 Optional<uint64_t> getAsSectionOffset() const;
/external/chromium_org/third_party/webtreemap/src/
Dwebtreemap.css8 /* Optional: CSS animation. */
15 /* Optional: highlight nodes on mouseover. */
20 /* Optional: Different background colors depending on symbol. */
56 /* Optional: Different borders depending on level. */
73 /* Optional: styling on node captions. */
81 /* Optional: styling on captions on mouse hover. */
/external/chromium_org/third_party/skia/src/core/
DSkRecords.h139 class Optional : SkNoncopyable {
141 Optional(T* ptr) : fPtr(ptr) {} in Optional() function
142 ~Optional() { if (fPtr) fPtr->~T(); } in ~Optional()
203 RECORD3(SaveLayer, Optional<SkRect>, bounds, Optional<SkPaint>, paint, SkCanvas::SaveFlags, flags);
222 RECORD4(DrawBitmap, Optional<SkPaint>, paint,
226 RECORD3(DrawBitmapMatrix, Optional<SkPaint>, paint, ImmutableBitmap, bitmap, SkMatrix, matrix);
227 RECORD4(DrawBitmapNine, Optional<SkPaint>, paint,
231 RECORD5(DrawBitmapRectToRect, Optional<SkPaint>, paint,
233 Optional<SkRect>, src,
240 RECORD3(DrawPicture, Optional<SkPaint>, paint,
[all …]
/external/skia/src/core/
DSkRecords.h123 class Optional : SkNoncopyable {
125 Optional(T* ptr) : fPtr(ptr) {} in Optional() function
126 ~Optional() { if (fPtr) fPtr->~T(); } in ~Optional()
187 RECORD3(SaveLayer, Optional<SkRect>, bounds, Optional<SkPaint>, paint, SkCanvas::SaveFlags, flags);
202 RECORD4(DrawBitmap, Optional<SkPaint>, paint,
206 RECORD3(DrawBitmapMatrix, Optional<SkPaint>, paint, ImmutableBitmap, bitmap, SkMatrix, matrix);
207 RECORD4(DrawBitmapNine, Optional<SkPaint>, paint,
211 RECORD5(DrawBitmapRectToRect, Optional<SkPaint>, paint,
213 Optional<SkRect>, src,
232 RECORD4(DrawSprite, Optional<SkPaint>, paint, ImmutableBitmap, bitmap, int, left, int, top);
[all …]
/external/clang/lib/ASTMatchers/Dynamic/
DVariantValue.cpp30 virtual llvm::Optional<DynTypedMatcher> getSingleMatcher() const { in getSingleMatcher()
56 virtual llvm::Optional<DynTypedMatcher> getSingleMatcher() const { in getSingleMatcher()
58 return llvm::Optional<DynTypedMatcher>(); in getSingleMatcher()
104 virtual llvm::Optional<DynTypedMatcher> getSingleMatcher() const { in getSingleMatcher()
105 return llvm::Optional<DynTypedMatcher>(); in getSingleMatcher()
144 llvm::Optional<DynTypedMatcher> VariantMatcher::getSingleMatcher() const { in getSingleMatcher()
145 return Value ? Value->getSingleMatcher() : llvm::Optional<DynTypedMatcher>(); in getSingleMatcher()
/external/llvm/include/llvm/Support/
DLockFileManager.h57 Optional<std::pair<std::string, int> > Owner;
58 Optional<std::error_code> Error;
63 static Optional<std::pair<std::string, int> >
/external/clang/include/clang/ASTMatchers/Dynamic/
DParser.h106 virtual llvm::Optional<MatcherCtor>
116 llvm::Optional<MatcherCtor>
138 static llvm::Optional<DynTypedMatcher>
151 static llvm::Optional<DynTypedMatcher>
/external/clang/include/clang/AST/
DNSAPI.h55 Optional<NSStringMethodKind> getNSStringMethodKind(Selector Sel) const;
87 Optional<NSArrayMethodKind> getNSArrayMethodKind(Selector Sel);
109 Optional<NSDictionaryMethodKind> getNSDictionaryMethodKind(Selector Sel);
173 Optional<NSNumberLiteralMethodKind>
178 Optional<NSNumberLiteralMethodKind>
/external/llvm/lib/Support/
DProcess.cpp72 Optional<std::string> Process::FindInEnvPath(const std::string& EnvName, in FindInEnvPath()
75 Optional<std::string> FoundPath; in FindInEnvPath()
76 Optional<std::string> OptPath = Process::GetEnv(EnvName); in FindInEnvPath()
/external/llvm/include/llvm/Object/
DCOFFYAML.h62 Optional<COFF::AuxiliaryFunctionDefinition> FunctionDefinition;
63 Optional<COFF::AuxiliarybfAndefSymbol> bfAndefSymbol;
64 Optional<COFF::AuxiliaryWeakExternal> WeakExternal;
66 Optional<COFF::AuxiliarySectionDefinition> SectionDefinition;
67 Optional<COFF::AuxiliaryCLRToken> CLRToken;
/external/llvm/unittests/Support/
DProcessTest.cpp56 Optional<std::string> val(Process::GetEnv("__LLVM_TEST_ENVIRON_VAR__")); in TEST()
62 Optional<std::string> val( in TEST()
71 Optional<std::string> val(Process::GetEnv("__LLVM_TEST_ENVIRON_VAR__")); in TEST()

12345678910>>...15