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.String value  
  • Constructor Summary

    Constructors 
    Constructor Description
    StringTinyType​(java.lang.String value)
    Wrapping ctor.
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object obj)  
    int hashCode()  
    java.lang.String toString()
    Get a String representation of this TinyType.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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:
      hashCode in class java.lang.Object
    • equals

      public boolean equals​(java.lang.Object obj)
      Overrides:
      equals in class java.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:
      toString in class java.lang.Object
      Returns:
      A type-informative, value-informative representation of this TinyType instance.