Class Optional<T>
public class Optional<T> : JVMBridgeBase<Optional<T>>, IDynamicMetaObjectProvider, IJVMBridgeCore, IDisposable, IJVMBridgeBaseStatic, IJVMBridgeBase, IJVMBridgeDefinition
Type Parameters
T
- Inheritance
-
JVMBridgeBaseJVMBridgeBase<Optional<T>>Optional<T>
- Implements
-
IJVMBridgeCoreIJVMBridgeBaseStaticIJVMBridgeBaseIJVMBridgeDefinition
- Inherited Members
-
JVMBridgeBase<Optional<T>>.SExecuteWithSignatureArray<T>(IJavaType, string, string, params object[])JVMBridgeBase<Optional<T>>.IsAssignableFrom(IJavaType)JVMBridgeBase<Optional<T>>.IsAssignableFrom<T>()JVMBridgeBase<Optional<T>>.Execute<T>(params T[])JVMBridgeBase<Optional<T>>.DynBridgeClazzJVMBridgeBase<Optional<T>>.BridgeClazzJVMBridgeBase.RuntimeClassNameOf<T>()JVMBridgeBase.ClassNameOf<T>()JVMBridgeBase.ClassOf<T>()JVMBridgeBase.WrapsDirect<TNewClass>(IJavaObject)JVMBridgeBase.Wraps<TNewClass>(IJavaObject)JVMBridgeBase.Wraps<TNewClass, TReturn>(IJavaObject)JVMBridgeBase.Wraps<TNewClass, TReturn, TConverter>(IJavaObject)JVMBridgeBase.MonitorEnter()JVMBridgeBase.MonitorExit()JVMBridgeBase.IsInstanceOf(IJavaType)JVMBridgeBase.IsInstanceOf<T>()JVMBridgeBase.RuntimeIsInstanceOf<T>()JVMBridgeBase.CastTo<TNewClass>()JVMBridgeBase.CastDirect<TNewClass>()JVMBridgeBase.Dispose()JVMBridgeBase.ToString()JVMBridgeBase.GetHashCode()JVMBridgeBase.Notify()JVMBridgeBase.NotifyAll()JVMBridgeBase.Wait()JVMBridgeBase.IExecuteWithSignature<TNewClass, TReturn, TConverter>(string, string, params object[])JVMBridgeBase.DynBridgeInstanceJVMBridgeBase.BridgeInstanceJVMBridgeBase.IsBridgeListener
- Extension Methods
Constructors
Optional()
Default constructor: even if the corresponding Java class does not have one, it is mandatory for JCOBridge
public Optional()
Optional(params object[])
Generic constructor: it is useful for JCOBridge when there is a derived class which needs to pass arguments to the highest JVMBridgeBase class
public Optional(params object[] args)
Parameters
args
object[]
Properties
BridgeClassName
https://www.jcobridge.com/api-clr/html/P_MASES_JCOBridge_C2JBridge_JVMBridgeBase_BridgeClassName.htm
public override string BridgeClassName { get; }
Property Value
IsBridgeAbstract
public override bool IsBridgeAbstract { get; }
Property Value
IsBridgeCloseable
public override bool IsBridgeCloseable { get; }
Property Value
IsBridgeInterface
public override bool IsBridgeInterface { get; }
Property Value
IsBridgeStatic
public override bool IsBridgeStatic { get; }
Property Value
Methods
Empty()
public static Optional<T> Empty()
Returns
Filter<Arg0objectSuperT>(Predicate<Arg0objectSuperT>)
public Optional<T> Filter<Arg0objectSuperT>(Predicate<Arg0objectSuperT> arg0) where Arg0objectSuperT : T
Parameters
Returns
Type Parameters
Arg0objectSuperT
T
FlatMap<U, Arg0objectSuperT, Arg0ExtendsJava_Util_Optional_Arg0ExtendsU_, Arg0ExtendsU>(Function<Arg0objectSuperT, Arg0ExtendsJava_Util_Optional_Arg0ExtendsU_>)
public Optional<U> FlatMap<U, Arg0objectSuperT, Arg0ExtendsJava_Util_Optional_Arg0ExtendsU_, Arg0ExtendsU>(Function<Arg0objectSuperT, Arg0ExtendsJava_Util_Optional_Arg0ExtendsU_> arg0) where Arg0objectSuperT : T where Arg0ExtendsJava_Util_Optional_Arg0ExtendsU_ : Optional<Arg0ExtendsU> where Arg0ExtendsU : U
Parameters
Returns
Type Parameters
U
Arg0objectSuperT
T
Arg0ExtendsJava_Util_Optional_Arg0ExtendsU_
Arg0ExtendsU
U
Get()
public T Get()
Returns
- T
T
IfPresentOrElse<Arg0objectSuperT>(Consumer<Arg0objectSuperT>, Runnable)
public void IfPresentOrElse<Arg0objectSuperT>(Consumer<Arg0objectSuperT> arg0, Runnable arg1) where Arg0objectSuperT : T
Parameters
Type Parameters
Arg0objectSuperT
T
IfPresent<Arg0objectSuperT>(Consumer<Arg0objectSuperT>)
public void IfPresent<Arg0objectSuperT>(Consumer<Arg0objectSuperT> arg0) where Arg0objectSuperT : T
Parameters
Type Parameters
Arg0objectSuperT
T
IsEmpty()
public bool IsEmpty()
Returns
IsPresent()
public bool IsPresent()
Returns
Map<U, Arg0objectSuperT, Arg0ExtendsU>(Function<Arg0objectSuperT, Arg0ExtendsU>)
public Optional<U> Map<U, Arg0objectSuperT, Arg0ExtendsU>(Function<Arg0objectSuperT, Arg0ExtendsU> arg0) where Arg0objectSuperT : T where Arg0ExtendsU : U
Parameters
Returns
Type Parameters
U
Arg0objectSuperT
T
Arg0ExtendsU
U
Of(T)
public static Optional<T> Of(T arg0)
Parameters
arg0
TT
Returns
OfNullable(T)
public static Optional<T> OfNullable(T arg0)
Parameters
arg0
TT
Returns
OrElse(T)
public T OrElse(T arg0)
Parameters
arg0
TT
Returns
- T
T
OrElseGet<Arg0ExtendsT>(Supplier<Arg0ExtendsT>)
public T OrElseGet<Arg0ExtendsT>(Supplier<Arg0ExtendsT> arg0) where Arg0ExtendsT : T
Parameters
Returns
- T
T
Type Parameters
Arg0ExtendsT
T
OrElseThrow()
public T OrElseThrow()
Returns
- T
T
OrElseThrow<Arg0ExtendsX, X>(Supplier<Arg0ExtendsX>)
public T OrElseThrow<Arg0ExtendsX, X>(Supplier<Arg0ExtendsX> arg0) where Arg0ExtendsX : X
Parameters
Returns
- T
T
Type Parameters
Arg0ExtendsX
X
X
Exceptions
Or<Arg0ExtendsJava_Util_Optional_Arg0ExtendsT_, Arg0ExtendsT>(Supplier<Arg0ExtendsJava_Util_Optional_Arg0ExtendsT_>)
public Optional<T> Or<Arg0ExtendsJava_Util_Optional_Arg0ExtendsT_, Arg0ExtendsT>(Supplier<Arg0ExtendsJava_Util_Optional_Arg0ExtendsT_> arg0) where Arg0ExtendsJava_Util_Optional_Arg0ExtendsT_ : Optional<Arg0ExtendsT> where Arg0ExtendsT : T
Parameters
Returns
Type Parameters
Arg0ExtendsJava_Util_Optional_Arg0ExtendsT_
Arg0ExtendsT
T
Stream()
public Stream<T> Stream()
Returns
Operators
implicit operator Optional(Optional<T>)
Converter from Optional<T> to Optional
public static implicit operator Optional(Optional<T> t)
Parameters
t
Optional<T>