Package tech.anima.tinytypes
Class StringTinyType
java.lang.Object
tech.anima.tinytypes.StringTinyType
public abstract class StringTinyType
extends java.lang.Object
Base abstract class for a String-based TinyType. A class extending this will
be recognized and processed by the TinyTypes support libraries, as long as
it's not abstract and provides a ctor matching the one on this class.
-
Field Summary
Fields Modifier and Type Field Description java.lang.Stringvalue -
Constructor Summary
Constructors Constructor Description StringTinyType(java.lang.String value)Wrapping ctor. -
Method Summary
-
Field Details
-
value
public final java.lang.String value
-
-
Constructor Details
-
StringTinyType
public StringTinyType(java.lang.String value)Wrapping ctor.- Parameters:
value- the native value to be wrapped.- Throws:
java.lang.IllegalArgumentException- for a null value.
-
-
Method Details
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()Get a String representation of this TinyType. Please note that this is not meant to be a "stringification" of the boxed value.- Overrides:
toStringin classjava.lang.Object- Returns:
- A type-informative, value-informative representation of this TinyType instance.
-