Class AbstractAnyAtomicItem<TYPE>
- java.lang.Object
-
- gov.nist.secauto.metaschema.core.metapath.item.atomic.AbstractAnyAtomicItem<TYPE>
-
- Type Parameters:
TYPE
- the Java type associated with the atomic type.
- All Implemented Interfaces:
IAnyAtomicItem
,IAtomicValuedItem
,IItem
- Direct Known Subclasses:
AbstractNumericItem
,AbstractStringItem
public abstract class AbstractAnyAtomicItem<TYPE> extends Object implements IAnyAtomicItem
Provides a common implementation for all atomic types.
-
-
Constructor Summary
Constructors Constructor Description AbstractAnyAtomicItem(TYPE value)
Construct a new atomic item using the providedvalue
.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description String
asString()
Get the item's string value.abstract IDataTypeAdapter<TYPE>
getJavaTypeAdapter()
Get the item's type adapter.TYPE
getValue()
Get the item's "wrapped" value.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface gov.nist.secauto.metaschema.core.metapath.item.atomic.IAnyAtomicItem
newStringItem, toAtomicItem
-
-
-
-
Constructor Detail
-
AbstractAnyAtomicItem
public AbstractAnyAtomicItem(@NonNull TYPE value)
Construct a new atomic item using the providedvalue
.- Parameters:
value
- the value to assign to this atomic item
-
-
Method Detail
-
getValue
@NonNull public TYPE getValue()
Description copied from interface:IItem
Get the item's "wrapped" value. This "wrapped" value may be:- In the case of an Assembly, a Java object representing the fields and flags of the assembly.
- In the case of a Field with flags, a Java object representing the field value and flags of the field.
- In the case of a Field without flags or a flag, a Java type managed by a
IDataTypeAdapter
or a primitive type provided by the Java standard library.
- Specified by:
getValue
in interfaceIAnyAtomicItem
- Specified by:
getValue
in interfaceIItem
- Returns:
- the value or
null
if the item has no available value
-
getJavaTypeAdapter
@NonNull public abstract IDataTypeAdapter<TYPE> getJavaTypeAdapter()
Description copied from interface:IAnyAtomicItem
Get the item's type adapter.- Specified by:
getJavaTypeAdapter
in interfaceIAnyAtomicItem
- Returns:
- the type adapter for the item
-
asString
public String asString()
Description copied from interface:IAnyAtomicItem
Get the item's string value.- Specified by:
asString
in interfaceIAnyAtomicItem
- Returns:
- the string value value of the item
-
-