public class ListTypeImpl extends AbstractType implements ListType
EMPTY_SUPERTYPES| Constructor and Description |
|---|
ListTypeImpl(String schema,
String name,
Type type) |
ListTypeImpl(String schema,
String name,
Type type,
String fieldName,
String defaultValue,
int minOccurs,
int maxOccurs) |
| Modifier and Type | Method and Description |
|---|---|
Object |
convert(Object object)
Converts the given value to an object compatible with the associated type.
|
Object |
decode(String string)
Decodes the string representation into an object of this type.
|
Object |
getDefaultValue()
Gets the default value of the list elements, if any.
|
Field |
getField()
Get the field defining the elements stored by this list.
|
String |
getFieldName()
The field name if any was specified.
|
Type |
getFieldType()
Get the field describing the element type the list accept.
|
int |
getMaxCount()
Gets the required maximum count of allowed elements in this list.
|
int |
getMinCount()
Gets the required minimum count of elements in this list.
|
Type |
getType() |
boolean |
isArray()
Whether the instances of this list are arrays.
|
boolean |
isListType()
Tests whether this type is a list type.
|
boolean |
isScalarList()
This method is provided for compatibility.
|
Object |
newInstance()
Creates a new instance according to this type and filled with default
values.
|
void |
setDefaultValue(String value)
Sets the default value encoded as a string.
|
void |
setLimits(int minOccurs,
int maxOccurs)
Sets list limits.
|
boolean |
validate(Object object)
Tests whether the given object is of this type.
|
encode, getName, getSchema, getSchemaName, getSuperType, getTypeHierarchy, isAny, isAnyType, isComplexType, isCompositeType, isSimpleType, isSuperTypeOfequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitencode, getName, getSchema, getSchemaName, getSuperType, getTypeHierarchy, isAnyType, isComplexType, isCompositeType, isSimpleType, isSuperTypeOfpublic ListTypeImpl(String schema, String name, Type type, String fieldName, String defaultValue, int minOccurs, int maxOccurs)
public void setLimits(int minOccurs,
int maxOccurs)
ListTypepublic void setDefaultValue(String value)
ListTypesetDefaultValue in interface ListTypepublic String getFieldName()
ListTypeThis is used to more for outputting the list as XML and for compatibility with XSD.
getFieldName in interface ListTypepublic Type getFieldType()
ListTypegetFieldType in interface ListTypepublic Field getField()
ListTypepublic Object getDefaultValue()
ListTypegetDefaultValue in interface ListTypepublic Type getType()
public int getMinCount()
ListTypegetMinCount in interface ListTypepublic int getMaxCount()
ListTypegetMaxCount in interface ListTypepublic boolean isListType()
TypeisListType in interface TypeisListType in class AbstractTypepublic Object decode(String string)
TypeReturns null if the string can not be decoded.
decode in interface Typedecode in class AbstractTypestring - the string to decodepublic boolean validate(Object object) throws TypeException
Typevalidate in interface Typevalidate in class AbstractTypeobject - the object to testTypeException - if an error occurs trying to retrieve the
supertypespublic Object newInstance()
TypenewInstance in interface TypenewInstance in class AbstractTypepublic Object convert(Object object) throws TypeException
Typeconvert in interface Typeobject - the value to convertTypeException - if the value to convert is not compatible with the associated typepublic boolean isArray()
ListTypepublic boolean isScalarList()
ListTypeisScalarList in interface ListTypeCopyright © 2014 Nuxeo SA. All Rights Reserved.