Package net.opengis
Class OgcPropertyList<ValueType extends Serializable>
java.lang.Object
net.opengis.OgcPropertyList<ValueType>
- Type Parameters:
ValueType
- Type of the properties value
- All Implemented Interfaces:
Serializable
,Iterable<ValueType>
,Collection<ValueType>
,List<ValueType>
- Direct Known Subclasses:
DataComponentPropertyList
,SMLPropertyList
public class OgcPropertyList<ValueType extends Serializable>
extends Object
implements List<ValueType>, 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.
- Since:
- Nov 8, 2014
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ArrayList<OgcProperty<ValueType>>
protected HashMap<String,
OgcProperty<ValueType>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a property with the specified name, href, and role to the listAdds a property with the specified name and value to the listvoid
add
(OgcProperty<ValueType> prop) Adds a property object to the list The property carries the actual value objectboolean
boolean
addAll
(int index, Collection<? extends ValueType> c) boolean
addAll
(Collection<? extends ValueType> c) protected void
void
clear()
boolean
boolean
containsAll
(Collection<?> c) void
copyTo
(OgcPropertyList<ValueType> other) get
(int i) Retrieves property value by namegetProperty
(int i) Retrieves property object at specified index.getProperty
(String name) Retrieves property object by name.boolean
hasProperty
(String name) int
boolean
isEmpty()
iterator()
int
listIterator
(int index) remove
(int index) boolean
Removes property with the given nameboolean
removeAll
(Collection<?> c) boolean
retainAll
(Collection<?> c) int
size()
subList
(int fromIndex, int toIndex) Object[]
toArray()
<T> T[]
toArray
(T[] a) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
equals, hashCode, replaceAll, sort, spliterator
-
Field Details
-
items
-
nameMap
-
-
Constructor Details
-
OgcPropertyList
public OgcPropertyList() -
OgcPropertyList
public OgcPropertyList(int size)
-
-
Method Details
-
copyTo
-
hasProperty
-
get
Retrieves property value by name- Parameters:
name
-- Returns:
- property value object
-
getProperty
Retrieves property object by name. Property object contains extra info such as name, xlink, etc. about a property- Parameters:
name
-- Returns:
- property object or null if no property with the given name exists
-
getProperty
Retrieves property object at specified index. Property object contains extra info such as name, xlink, etc. about a property- Parameters:
i
- index of property- Returns:
- property object or null
-
add
Adds a property object to the list The property carries the actual value object- Parameters:
prop
-
-
add
Adds a property with the specified name and value to the list- Parameters:
name
- name to use on property (= name attribute)e
- the property value object- Returns:
- the newly created OgcPropery object
- Throws:
IllegalArgumentException
- if name is already in use
-
add
Adds a property with the specified name, href, and role to the list- Parameters:
name
- name to use on property (= name attribute)href
-role
- can be null- Returns:
- the newly created OgcPropery object
- Throws:
IllegalArgumentException
- if name is already in use
-
remove
Removes property with the given name- Parameters:
name
-- Returns:
- The property that was just removed
-
getPropertyNames
- Returns:
- Read-only set of all property names
-
getProperties
- Returns:
- Read-only list of all properties
-
add
- Specified by:
add
in interfaceCollection<ValueType extends Serializable>
- Specified by:
add
in interfaceList<ValueType extends Serializable>
-
add
- Specified by:
add
in interfaceList<ValueType extends Serializable>
-
addAll
- Specified by:
addAll
in interfaceCollection<ValueType extends Serializable>
- Specified by:
addAll
in interfaceList<ValueType extends Serializable>
-
addAll
- Specified by:
addAll
in interfaceList<ValueType extends Serializable>
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<ValueType extends Serializable>
- Specified by:
clear
in interfaceList<ValueType extends Serializable>
-
contains
- Specified by:
contains
in interfaceCollection<ValueType extends Serializable>
- Specified by:
contains
in interfaceList<ValueType extends Serializable>
-
containsAll
- Specified by:
containsAll
in interfaceCollection<ValueType extends Serializable>
- Specified by:
containsAll
in interfaceList<ValueType extends Serializable>
-
get
- Specified by:
get
in interfaceList<ValueType extends Serializable>
-
indexOf
- Specified by:
indexOf
in interfaceList<ValueType extends Serializable>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection<ValueType extends Serializable>
- Specified by:
isEmpty
in interfaceList<ValueType extends Serializable>
-
iterator
- Specified by:
iterator
in interfaceCollection<ValueType extends Serializable>
- Specified by:
iterator
in interfaceIterable<ValueType extends Serializable>
- Specified by:
iterator
in interfaceList<ValueType extends Serializable>
-
lastIndexOf
- Specified by:
lastIndexOf
in interfaceList<ValueType extends Serializable>
-
listIterator
- Specified by:
listIterator
in interfaceList<ValueType extends Serializable>
-
listIterator
- Specified by:
listIterator
in interfaceList<ValueType extends Serializable>
-
remove
- Specified by:
remove
in interfaceCollection<ValueType extends Serializable>
- Specified by:
remove
in interfaceList<ValueType extends Serializable>
-
remove
- Specified by:
remove
in interfaceList<ValueType extends Serializable>
-
removeAll
- Specified by:
removeAll
in interfaceCollection<ValueType extends Serializable>
- Specified by:
removeAll
in interfaceList<ValueType extends Serializable>
-
retainAll
- Specified by:
retainAll
in interfaceCollection<ValueType extends Serializable>
- Specified by:
retainAll
in interfaceList<ValueType extends Serializable>
-
set
- Specified by:
set
in interfaceList<ValueType extends Serializable>
-
size
public int size()- Specified by:
size
in interfaceCollection<ValueType extends Serializable>
- Specified by:
size
in interfaceList<ValueType extends Serializable>
-
subList
- Specified by:
subList
in interfaceList<ValueType extends Serializable>
-
toArray
- Specified by:
toArray
in interfaceCollection<ValueType extends Serializable>
- Specified by:
toArray
in interfaceList<ValueType extends Serializable>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArray
in interfaceCollection<ValueType extends Serializable>
- Specified by:
toArray
in interfaceList<ValueType extends Serializable>
-
checkName
-