Package com.io7m.cedarbridge.runtime.api
Record Class CBNone<T extends CBSerializableType>
java.lang.Object
java.lang.Record
com.io7m.cedarbridge.runtime.api.CBNone<T>
- Type Parameters:
T- The type of values
- All Implemented Interfaces:
CBOptionType<T>,CBSerializableType,Formattable
The None case.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends CBSerializableType>
CBNone<T> deserialize(CBSerializationContextType context, CBDeserializeType<T> ft) Deserialize the given value.final booleanIndicates whether some other object is "equal to" this one.voidfinal inthashCode()Returns a hash code value for this object.static <T extends CBSerializableType>
voidserialize(CBSerializationContextType context, CBNone<T> x, CBSerializeType<T> ft) Serialize the given value.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CBNone
public CBNone()Creates an instance of aCBNonerecord class.
-
-
Method Details
-
formatTo
- Specified by:
formatToin interfaceFormattable
-
asOptional
- Specified by:
asOptionalin interfaceCBOptionType<T extends CBSerializableType>- Returns:
- This value as a Java Optional
-
serialize
public static <T extends CBSerializableType> void serialize(CBSerializationContextType context, CBNone<T> x, CBSerializeType<T> ft) throws IOException Serialize the given value.- Type Parameters:
T- The type of list values- Parameters:
context- The serialization contextx- The valueft- A serializer forT- Throws:
IOException- On errors
-
deserialize
public static <T extends CBSerializableType> CBNone<T> deserialize(CBSerializationContextType context, CBDeserializeType<T> ft) throws IOException Deserialize the given value.- Parameters:
context- The serialization context- Returns:
- The deserialized value
- Throws:
IOException- On errors
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
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.
-