java.lang.Object
java.lang.Record
org.seppiko.commons.utils.reflect.TypeAndValue<T>
- All Implemented Interfaces:
Serializable
Package for value and type
- Author:
- Leonard Woo
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTypeAndValue(Class<T> type, T value) Creates an instance of aTypeAndValuerecord class. -
Method Summary
-
Constructor Details
-
TypeAndValue
Creates an instance of aTypeAndValuerecord class.- Parameters:
type- the value for thetyperecord componentvalue- the value for thevaluerecord component
-
-
Method Details
-
toString
-
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-