ValueType
- Type of the properties valuepublic class OgcPropertyList<ValueType extends java.io.Serializable>
extends java.lang.Object
implements java.util.List<ValueType>, java.io.Serializable
List implementation for holding list of OgcProperty objects. As seen from the interface the elements of the list are actually the properties values which allows for simple browsing when no access to the actual property is needed. For more advanced usage, OgcProperty objects themselves can be retrieved with getProperty() methods.
Modifier and Type | Field and Description |
---|---|
protected java.util.ArrayList<OgcProperty<ValueType>> |
items |
protected java.util.HashMap<java.lang.String,OgcProperty<ValueType>> |
nameMap |
Constructor and Description |
---|
OgcPropertyList() |
OgcPropertyList(int size) |
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
ValueType e) |
void |
add(OgcProperty<ValueType> prop)
Adds a property object to the list
The property carries the actual value object
|
OgcProperty<ValueType> |
add(java.lang.String name,
java.lang.String href,
java.lang.String role)
Adds a property with the specified name, href, and role to the list
|
OgcProperty<ValueType> |
add(java.lang.String name,
ValueType e)
Adds a property with the specified name and value to the list
|
boolean |
add(ValueType e) |
boolean |
addAll(java.util.Collection<? extends ValueType> c) |
boolean |
addAll(int index,
java.util.Collection<? extends ValueType> c) |
protected void |
checkName(java.lang.String name) |
void |
clear() |
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection<?> c) |
void |
copyTo(OgcPropertyList<ValueType> other) |
ValueType |
get(int i) |
ValueType |
get(java.lang.String name)
Retrieves property value by name
|
java.util.List<OgcProperty<ValueType>> |
getProperties() |
OgcProperty<ValueType> |
getProperty(int i)
Retrieves property object at specified index.
|
OgcProperty<ValueType> |
getProperty(java.lang.String name)
Retrieves property object by name.
|
java.util.Set<java.lang.String> |
getPropertyNames() |
boolean |
hasProperty(java.lang.String name) |
int |
indexOf(java.lang.Object o) |
boolean |
isEmpty() |
java.util.Iterator<ValueType> |
iterator() |
int |
lastIndexOf(java.lang.Object o) |
java.util.ListIterator<ValueType> |
listIterator() |
java.util.ListIterator<ValueType> |
listIterator(int index) |
ValueType |
remove(int index) |
boolean |
remove(java.lang.Object o) |
OgcProperty<ValueType> |
remove(java.lang.String name)
Removes property with the given name
|
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
retainAll(java.util.Collection<?> c) |
ValueType |
set(int i,
ValueType e) |
int |
size() |
java.util.List<ValueType> |
subList(int fromIndex,
int toIndex) |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
protected java.util.ArrayList<OgcProperty<ValueType extends java.io.Serializable>> items
protected java.util.HashMap<java.lang.String,OgcProperty<ValueType extends java.io.Serializable>> nameMap
public OgcPropertyList()
public OgcPropertyList(int size)
public void copyTo(OgcPropertyList<ValueType> other)
public boolean hasProperty(java.lang.String name)
public ValueType get(java.lang.String name)
name
- public OgcProperty<ValueType> getProperty(java.lang.String name)
name
- public OgcProperty<ValueType> getProperty(int i)
i
- index of propertypublic void add(OgcProperty<ValueType> prop)
prop
- public OgcProperty<ValueType> add(java.lang.String name, ValueType e)
name
- name to use on property (= name attribute)e
- the property value objectjava.lang.IllegalArgumentException
- if name is already in usepublic OgcProperty<ValueType> add(java.lang.String name, java.lang.String href, java.lang.String role)
name
- name to use on property (= name attribute)href
- role
- can be nulljava.lang.IllegalArgumentException
- if name is already in usepublic OgcProperty<ValueType> remove(java.lang.String name)
name
- public java.util.Set<java.lang.String> getPropertyNames()
public java.util.List<OgcProperty<ValueType>> getProperties()
public boolean add(ValueType e)
public void add(int index, ValueType e)
add
in interface java.util.List<ValueType extends java.io.Serializable>
public boolean addAll(java.util.Collection<? extends ValueType> c)
public boolean addAll(int index, java.util.Collection<? extends ValueType> c)
addAll
in interface java.util.List<ValueType extends java.io.Serializable>
public void clear()
public boolean contains(java.lang.Object o)
public boolean containsAll(java.util.Collection<?> c)
public ValueType get(int i)
get
in interface java.util.List<ValueType extends java.io.Serializable>
public int indexOf(java.lang.Object o)
indexOf
in interface java.util.List<ValueType extends java.io.Serializable>
public boolean isEmpty()
public java.util.Iterator<ValueType> iterator()
public int lastIndexOf(java.lang.Object o)
lastIndexOf
in interface java.util.List<ValueType extends java.io.Serializable>
public java.util.ListIterator<ValueType> listIterator()
listIterator
in interface java.util.List<ValueType extends java.io.Serializable>
public java.util.ListIterator<ValueType> listIterator(int index)
listIterator
in interface java.util.List<ValueType extends java.io.Serializable>
public boolean remove(java.lang.Object o)
public ValueType remove(int index)
remove
in interface java.util.List<ValueType extends java.io.Serializable>
public boolean removeAll(java.util.Collection<?> c)
public boolean retainAll(java.util.Collection<?> c)
public ValueType set(int i, ValueType e)
set
in interface java.util.List<ValueType extends java.io.Serializable>
public int size()
public java.util.List<ValueType> subList(int fromIndex, int toIndex)
subList
in interface java.util.List<ValueType extends java.io.Serializable>
public java.lang.Object[] toArray()
public <T> T[] toArray(T[] a)
protected void checkName(java.lang.String name)