Class CodeAndLabel

  • All Implemented Interfaces:
    java.io.Serializable

    public class CodeAndLabel
    extends java.lang.Object
    implements java.io.Serializable
    Value object which has a label and a normalized code. Normalized means that the original code arguments turn to upper case and any symbol which isn't from A-Z or 0-9 is replaced by an underscore character.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      CodeAndLabel​(java.lang.String code, java.lang.String label)
      Creates an instance for specified code and label.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List<java.lang.String> asCodes​(java.util.List<CodeAndLabel> codesAndLabels)  
      static java.util.List<java.lang.String> asLabels​(java.util.List<CodeAndLabel> codesAndLabels)  
      boolean equals​(java.lang.Object obj)  
      java.lang.String getCode()
      Returns the attribute.
      java.lang.String getLabel()
      Returns the label.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • CodeAndLabel

        public CodeAndLabel​(java.lang.String code,
                            java.lang.String label)
        Creates an instance for specified code and label. The code should be already be normalized.
    • Method Detail

      • getLabel

        public final java.lang.String getLabel()
        Returns the label.
      • getCode

        public final java.lang.String getCode()
        Returns the attribute.
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

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

        public static java.util.List<java.lang.String> asLabels​(java.util.List<CodeAndLabel> codesAndLabels)
      • asCodes

        public static java.util.List<java.lang.String> asCodes​(java.util.List<CodeAndLabel> codesAndLabels)