Class DataUnit


  • public final class DataUnit
    extends java.lang.Object
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  DataUnit.DataUnitType  
    • Constructor Summary

      Constructors 
      Constructor Description
      DataUnit​(DataUnit.DataUnitType pLiteral)
      Initialize object from real enumeration literal
      DataUnit​(java.lang.String pLiteralName)
      Initialize object using the name of the literal.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object pObject)
      Object.equals(Object)
      DataUnit.DataUnitType getLiteral()
      Method returns the literal that is represented by this object.
      java.lang.String getUnknownLiteralName()
      Method returns the actual name of the unknown literal
      int hashCode()
      Object.hashCode()
      boolean isUnknownLiteral()
      Method checks if the represented literal is actually unknown or not.
      java.lang.String toString()
      Object.toString()
      static DataUnit valueOf​(java.lang.String pLiteralName)
      Method returns extensible enumeration based on the passed name.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • COUPON

        public static final DataUnit COUPON
      • UNKNOWN

        public static final DataUnit UNKNOWN
    • Constructor Detail

      • DataUnit

        public DataUnit​(DataUnit.DataUnitType pLiteral)
        Initialize object from real enumeration literal
        Parameters:
        pLiteral - Enumeration literal that should be used to initialize the extensible enumeration. The parameter must not be null.
      • DataUnit

        public DataUnit​(java.lang.String pLiteralName)
        Initialize object using the name of the literal.
        Parameters:
        pLiteralName - Literal name that should be used to initialize the extensible enumeration. If the parameter is null or has an unknown literal name then a "unknown" version will be created.
        See Also:
        isUnknownLiteral()
    • Method Detail

      • valueOf

        public static DataUnit valueOf​(java.lang.String pLiteralName)
        Method returns extensible enumeration based on the passed name. If the literal name is unknown then an instance representing "unknown" will be returned.
        Parameters:
        pLiteral - Enumeration literal that should be used to initialize the extensible enumeration. The parameter must not be null.
        Returns:
      • getLiteral

        public DataUnit.DataUnitType getLiteral()
        Method returns the literal that is represented by this object.
        Returns:
        DataUnit Literal that is represented by this object. The method never returns null.
      • isUnknownLiteral

        public boolean isUnknownLiteral()
        Method checks if the represented literal is actually unknown or not.
        Returns:
        boolean Method returns true if this object represents an unknown literal.
      • getUnknownLiteralName

        public java.lang.String getUnknownLiteralName()
        Method returns the actual name of the unknown literal
        Returns:
        String Name of the unknown literal or null in case that the literal is known.
      • hashCode

        public int hashCode()
        Object.hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object pObject)
        Object.equals(Object)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Object.toString()
        Overrides:
        toString in class java.lang.Object