Package com.iizix.prop
Class CodeItemImpl
java.lang.Object
com.iizix.prop.CodeItemImpl
The code item implementation.
- Author:
- Christopher Mindus
Field Summary
Constructor Summary
ConstructorDescriptionCodeItemImpl
(KString value) Constructor for an item without code.CodeItemImpl
(String value) Constructor for an item without code.CodeItemImpl
(String code, KString value) Constructor for an item with code and value.CodeItemImpl
(String code, String value) Constructor for an item with code and value.Method Summary
Modifier and TypeMethodDescriptionclone()
Clones the instance.boolean
Checks for equality.getCode()
Gets the code string.Gets the item text as a KString.Gets the item text as a String.getValue()
Gets the value.boolean
hasCode()
Checks if this item has a code.boolean
Returns whether the item is a KString or not.
Constructor Details
CodeItemImpl
Constructor for an item without code.- Parameters:
value
- The item value, never null.- Throws:
NullPointerException
- If item value is null.
CodeItemImpl
Constructor for an item with code and value.- Parameters:
code
- The code, perhaps null for none.value
- The item value, never null.- Throws:
NullPointerException
- If item value is null.
CodeItemImpl
Constructor for an item without code.- Parameters:
value
- The item value, never null.- Throws:
NullPointerException
- If item value is null.
CodeItemImpl
Constructor for an item with code and value.- Parameters:
code
- The code, perhaps null for none.value
- The item value, never null.- Throws:
NullPointerException
- If item value is null.
Method Details
clone
Clones the instance.equals
Checks for equality.hasCode
public boolean hasCode()Checks if this item has a code.isKString
public boolean isKString()Returns whether the item is a KString or not.getCode
Gets the code string.getString
Gets the item text as a String.getKString
Gets the item text as a KString.- Specified by:
getKString
in interfaceICodeItem
- Returns:
- The item KString, potentially converted from String.
getValue
Gets the value.