Class CodeImp

java.lang.Object
net.tangly.core.codes.CodeImp
All Implemented Interfaces:
Code

public abstract class CodeImp extends Object implements Code
The class represents an immutable code describing a set of related codes aggregated in the same code table.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    CodeImp(int id, String code, boolean enabled)
    Constructor of the immutable class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the human-readable representation of a code table entity.
    boolean
    Returns true if the code table instance is enabled.
    boolean
     
    int
     
    int
    id()
    Returns the unique identifier of a code table entity.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • CodeImp

      protected CodeImp(int id, String code, boolean enabled)
      Constructor of the immutable class.
      Parameters:
      id - code identifier of the instance
      code - human-readable code text of the instance
      enabled - flag indicating if the code is enabled
  • Method Details

    • id

      public int id()
      Description copied from interface: Code
      Returns the unique identifier of a code table entity.
      Specified by:
      id in interface Code
      Returns:
      unique identifier of the code table instance
    • code

      public String code()
      Description copied from interface: Code
      Returns the human-readable representation of a code table entity.
      Specified by:
      code in interface Code
      Returns:
      human-readable code
    • enabled

      public boolean enabled()
      Description copied from interface: Code
      Returns true if the code table instance is enabled.
      Specified by:
      enabled in interface Code
      Returns:
      flag indicating if the code is enabled or archived
    • hashCode

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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object