Class Single<T1>
java.lang.Object
dk.cloudcreate.essentials.shared.functional.tuple.Single<T1>
- Type Parameters:
T1- the first element type
- All Implemented Interfaces:
Tuple<Single<T1>>,Serializable
Represents a
Note:
Tuple with one element.Note:
Single supports equals(Object) comparison using subclasses, e.g.:
public class Option extends Single<String> {
public Option(String optionalValue) {
super(optionalValue);
}
}
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
_1
The first element in this tuple
-
-
Constructor Details
-
Single
Create a newTuplewith 1 element- Parameters:
t1- the first element
-
-
Method Details
-
arity
public int arity()Description copied from interface:TupleNumber of arguments/elements in the Tuple -
toList
Description copied from interface:TupleConvert the Tuple to a list -
_1
Returns the first element in this tuple- Returns:
- the first element in this tuple
-
equals
-
hashCode
public int hashCode() -
map
Maps the element of thisSingleusing the mapping function -
toString
-