Class CodeAndLabel
- java.lang.Object
-
- ch.systemsx.cisd.openbis.generic.shared.basic.dto.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()
-
-
-
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 classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.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)
-
-