Package org.cip4.lib.xjdf.type
Class AbstractList<T>
- java.lang.Object
-
- jakarta.xml.bind.annotation.adapters.XmlAdapter<ValueType,BoundType>
-
- org.cip4.lib.xjdf.type.AbstractXJdfType<java.lang.String,AbstractList<T>>
-
- org.cip4.lib.xjdf.type.AbstractList<T>
-
- Direct Known Subclasses:
IntegerList,NMTokens
public abstract class AbstractList<T> extends AbstractXJdfType<java.lang.String,AbstractList<T>>
A list is an enumerated set of values, which is expressed as a list of space separated values.
-
-
Constructor Summary
Constructors Constructor Description AbstractList()Default constructor.AbstractList(java.lang.String value)Custom constructor, accepting a String object for initializing.AbstractList(java.util.List<T> list)Custom constructor, accepting a list object for initializing.AbstractList(T... values)Custom constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract TconvertFromString(java.lang.String value)Converts the data type from a String value.Tget(int i)Returns the element on position i.java.util.List<T>getList()Getter for list attribute.java.lang.Stringmarshal(AbstractList<T> obj)voidsetList(java.util.List<T> list)Setter for list attribute.AbstractList<T>unmarshal(java.lang.String v)-
Methods inherited from class org.cip4.lib.xjdf.type.AbstractXJdfType
equals, hashCode, toString
-
-
-
-
Constructor Detail
-
AbstractList
public AbstractList()
Default constructor.
-
AbstractList
public AbstractList(T... values)
Custom constructor. Accepting a variable number of integers.
-
AbstractList
public AbstractList(java.util.List<T> list)
Custom constructor, accepting a list object for initializing.
-
AbstractList
public AbstractList(java.lang.String value)
Custom constructor, accepting a String object for initializing.
-
-
Method Detail
-
get
public T get(int i)
Returns the element on position i.- Parameters:
i- Position.- Returns:
- Element on position i.
-
getList
public java.util.List<T> getList()
Getter for list attribute.- Returns:
- the list
-
setList
public void setList(java.util.List<T> list)
Setter for list attribute.- Parameters:
list- the list to set
-
convertFromString
protected abstract T convertFromString(java.lang.String value)
Converts the data type from a String value.- Parameters:
value- String expression.- Returns:
- String as target data type.
-
marshal
public java.lang.String marshal(AbstractList<T> obj)
- Specified by:
marshalin classjakarta.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,AbstractList<T>>- See Also:
XmlAdapter.marshal(java.lang.Object)
-
unmarshal
public AbstractList<T> unmarshal(java.lang.String v) throws java.lang.Exception
- Specified by:
unmarshalin classjakarta.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,AbstractList<T>>- Throws:
java.lang.Exception- See Also:
XmlAdapter.unmarshal(java.lang.Object)
-
-