Top Description Inners Fields Constructors Methods
org.apache.xerces.impl.dv.xs

public Class ListDV

extends TypeValidator
Class Inheritance
Imports
java.util.AbstractList, org.apache.xerces.impl.dv.InvalidDatatypeValueException, .ValidationContext, org.apache.xerces.xs.datatypes.ObjectList

Represent the schema list types
Authors
Neeraj Bajaj, Sun Microsystems, inc., Sandy Gao, IBM
Version
$Id: ListDV.java 725840 2008-12-11 22:19:06Z mrglavas $

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Inherited from org.apache.xerces.impl.dv.xs.TypeValidator:
EQUALGREATER_THANINDETERMINATELESS_THAN

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
public short
public int
Inherited from org.apache.xerces.impl.dv.xs.TypeValidator:
checkExtraRulescomparegetDigitgetFractionDigitsgetTotalDigitsisDigitisIdentical

Constructor Detail

ListDVback to summary
public ListDV()

Method Detail

getActualValueback to summary
public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException

Implements abstract org.apache.xerces.impl.dv.xs.TypeValidator.getActualValue.

getAllowedFacetsback to summary
public short getAllowedFacets()

Implements abstract org.apache.xerces.impl.dv.xs.TypeValidator.getAllowedFacets.

getDataLengthback to summary
public int getDataLength(Object value)

Overrides org.apache.xerces.impl.dv.xs.TypeValidator.getDataLength.

org.apache.xerces.impl.dv.xs back to summary

pack-priv final Class ListDV.ListData

extends AbstractList
implements ObjectList
Class Inheritance
All Implemented Interfaces
org.apache.xerces.xs.datatypes.ObjectList, java.util.List, java.util.SequencedCollection, java.util.Collection, java.lang.Iterable

Field Summary

Modifier and TypeField and Description
private String
pack-priv final Object[]
Inherited from java.util.AbstractList:
modCount

Constructor Summary

AccessConstructor and Description
public
ListData(Object[] data)

Method Summary

Modifier and TypeMethod and Description
public boolean
contains(Object
Object whose presence in this list is to be tested.
item
)

Overrides java.util.AbstractCollection.contains.

Implements org.apache.xerces.xs.datatypes.ObjectList.contains, java.util.List.contains, java.util.Collection.contains.

Checks if the Object item is a member of this list.
public boolean
equals(Object
the object to be compared for equality with this list
obj
)

Overrides java.util.AbstractList.equals.

Implements java.util.List.equals, java.util.Collection.equals.

Compares the specified object with this list for equality.
public Object
get(int
index of the element to return
index
)

Implements abstract java.util.AbstractList.get.

Implements java.util.List.get.

Returns the element at the specified position in this list.
public int
getLength()

Implements org.apache.xerces.xs.datatypes.ObjectList.getLength.

The number of Objects in the list.
public int
hashCode()

Overrides java.util.AbstractList.hashCode.

Implements java.util.List.hashCode, java.util.Collection.hashCode.

Returns the hash code value for this list.
public Object
item(int
index into the collection.
index
)

Implements org.apache.xerces.xs.datatypes.ObjectList.item.

Returns the indexth item in the collection or null if index is greater than or equal to the number of objects in the list.
public int
size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.List.size, java.util.Collection.size.

Returns the number of elements in this list.
public synchronized String
toString()

Overrides java.util.AbstractCollection.toString.

Returns a string representation of this collection.
Inherited from java.util.AbstractList:
addaddaddAllclearindexOfiteratorlastIndexOflistIteratorlistIteratorremoveremoveRangesetsubList

Field Detail

canonicalback to summary
private String canonical
databack to summary
pack-priv final Object[] data

Constructor Detail

ListDataback to summary
public ListData(Object[] data)

Method Detail

containsback to summary
public boolean contains(Object item)

Overrides java.util.AbstractCollection.contains.

Implements org.apache.xerces.xs.datatypes.ObjectList.contains, java.util.List.contains, java.util.Collection.contains.

Doc from org.apache.xerces.xs.datatypes.ObjectList.contains.

Checks if the Object item is a member of this list.

Parameters
item:Object

Object whose presence in this list is to be tested.

Returns:boolean

True if this list contains the Object item.

equalsback to summary
public boolean equals(Object obj)

Overrides java.util.AbstractList.equals.

Implements java.util.List.equals, java.util.Collection.equals.

Doc from java.util.List.equals.

Compares the specified object with this list for equality. Returns true if and only if the specified object is also a list, both lists have the same size, and all corresponding pairs of elements in the two lists are equal. (Two elements e1 and e2 are equal if Objects.equals(e1, e2).) In other words, two lists are defined to be equal if they contain the same elements in the same order. This definition ensures that the equals method works properly across different implementations of the List interface.

Parameters
obj:Object

the object to be compared for equality with this list

Returns:boolean

true if the specified object is equal to this list

getback to summary
public Object get(int index)

Implements abstract java.util.AbstractList.get.

Implements java.util.List.get.

Doc from java.util.List.get.

Returns the element at the specified position in this list.

Parameters
index:int

index of the element to return

Returns:Object

the element at the specified position in this list

getLengthback to summary
public int getLength()

Implements org.apache.xerces.xs.datatypes.ObjectList.getLength.

Doc from org.apache.xerces.xs.datatypes.ObjectList.getLength.

The number of Objects in the list. The range of valid child object indices is 0 to length-1 inclusive.

hashCodeback to summary
public int hashCode()

Overrides java.util.AbstractList.hashCode.

Implements java.util.List.hashCode, java.util.Collection.hashCode.

Doc from java.util.List.hashCode.

Returns the hash code value for this list. The hash code of a list is defined to be the result of the following calculation:

int hashCode = 1;
    for (E e : list)
        hashCode = 31*hashCode + (e==null ? 0 : e.hashCode());
This ensures that list1.equals(list2) implies that list1.hashCode()==list2.hashCode() for any two lists, list1 and list2, as required by the general contract of Object#hashCode.
Returns:int

the hash code value for this list

itemback to summary
public Object item(int index)

Implements org.apache.xerces.xs.datatypes.ObjectList.item.

Doc from org.apache.xerces.xs.datatypes.ObjectList.item.

Returns the indexth item in the collection or null if index is greater than or equal to the number of objects in the list. The index starts at 0.

Parameters
index:int

index into the collection.

Returns:Object

The Object at the indexth position in the ObjectList, or null if the index specified is not valid - greater than or equal to the number of items in the list or less than zero.

sizeback to summary
public int size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.List.size, java.util.Collection.size.

Doc from java.util.List.size.

Returns the number of elements in this list. If this list contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

Returns:int

the number of elements in this list

toStringback to summary
public synchronized String toString()

Overrides java.util.AbstractCollection.toString.

Doc from java.util.AbstractCollection.toString.

Returns a string representation of this collection. The string representation consists of a list of the collection's elements in the order they are returned by its iterator, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (comma and space). Elements are converted to strings as by String#valueOf(Object).

Returns:String

a string representation of this collection