Package org.openjdk.jmh.util
Class Optional<T>
java.lang.Object
org.openjdk.jmh.util.Optional<T>
- Type Parameters:
T
- stored value.
- All Implemented Interfaces:
Serializable
Option class
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
val
-
-
Constructor Details
-
Optional
-
Optional
private Optional()
-
-
Method Details
-
orElse
-
orAnother
-
none
Produce empty Option- Type Parameters:
T
- type- Returns:
- empty option
-
of
Wrap the existing value in Option.- Type Parameters:
T
- type- Parameters:
val
- value to wrap- Returns:
- option with value
-
eitherOf
-
hasValue
public boolean hasValue() -
toString
-
get
-
equals
-
hashCode
public int hashCode()
-