Constructor and Description |
---|
Some()
Creates a maybe with the value null
|
Some(TYPE value)
Creates a maybe with an value
|
Modifier and Type | Method and Description |
---|---|
TYPE |
getValue() |
TYPE |
getValueOrElse(TYPE defaultValue)
Gets the value of the maybe, if the maybe is not nothing, else
the default is returned
|
boolean |
isNothing() |
boolean |
isSomething() |
public Some()
public Some(TYPE value)
value
- the value, can be nullpublic TYPE getValue()
public TYPE getValueOrElse(TYPE defaultValue)
IMaybe
getValueOrElse
in interface IMaybe<TYPE>
defaultValue
- the default valuepublic boolean isNothing()
public boolean isSomething()
isSomething
in interface IMaybe<TYPE>
Siehe auch Jowidgets Nutzerhandbuch