Package dev.getelements.elements.rt.util
Class SimpleReference<T>
java.lang.Object
dev.getelements.elements.rt.util.SimpleReference<T>
- Type Parameters:
T-
- All Implemented Interfaces:
Comparable<SimpleReference<T>>
A simple reference type intended to be used in lambda functions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintIf the type T is of theComparable<T>then, this will perform the comparison.get()Gets the value.Sets the value.
-
Constructor Details
-
SimpleReference
public SimpleReference() -
SimpleReference
-
-
Method Details
-
get
Gets the value.- Returns:
- the value.
-
set
Sets the value.- Parameters:
t- the value- Returns:
- the value that was just set
-
compareTo
If the type T is of theComparable<T>then, this will perform the comparison. Otherwise, this will result in aClassCastException.- Specified by:
compareToin interfaceComparable<T>- Parameters:
o- the object to be compared.- Returns:
- the comparison value
-