Package org.apache.sis.referencing
Class Properties
- All Implemented Interfaces:
Serializable
,Map<String,
Object>
An immutable map fetching all properties from the specified identified object.
Calls to
get
methods are forwarded to the appropriate IdentifiedObject
method.
This map does not contain null value. Collections are converted to arrays.
This map is read-only. Whether it is serializable, immutable or thread-safe depends if the
underlying IdentifiedObject
instance is itself serializable, immutable or thread-safe.
- Since:
- 0.4
- Version:
- 1.1
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sis.internal.util.AbstractMap
AbstractMap.EntryIterator<K,
V>, AbstractMap.IteratorAdapter<K, V>, AbstractMap.KeyIterator -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final int
The bitmask of properties to exclude.The mapping from key names to the index expected by thegetAt(int)
method.private static final String[]
The keys to search for.(package private) final org.opengis.referencing.IdentifiedObject
The object where all properties come from.private static final long
For cross-version compatibility. -
Constructor Summary
ConstructorsConstructorDescriptionProperties
(org.opengis.referencing.IdentifiedObject object, String[] excludes) Creates new properties from the specified identified object. -
Method Summary
Modifier and TypeMethodDescriptionprotected AbstractMap.EntryIterator
<String, Object> Iterates over theKEYS
, returning only the entry having a non-null value.Returns the value to which this map maps the specified key.(package private) final Object
getAt
(int key) Returns the value to which this map maps the specified index.boolean
isEmpty()
Returnsfalse
if this map contains at least one element, ortrue
otherwise.int
size()
Returns the number of non-null properties in this map.Methods inherited from class org.apache.sis.internal.util.AbstractMap
addKey, addValue, clear, containsKey, containsValue, entrySet, equals, getOrDefault, hashCode, keySet, put, putAll, remove, toString, values
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility.- See Also:
-
KEYS
The keys to search for. The index of each element in this array must matches the index searched bygetAt(int)
. In other words, this array performs the reverse mapping ofINDICES
. -
INDICES
The mapping from key names to the index expected by thegetAt(int)
method. This map shall not be modified after construction (for multi-thread safety without synchronization). -
object
final org.opengis.referencing.IdentifiedObject objectThe object where all properties come from. -
excludeMask
final int excludeMaskThe bitmask of properties to exclude.
-
-
Constructor Details
-
Properties
Properties(org.opengis.referencing.IdentifiedObject object, String[] excludes) Creates new properties from the specified identified object.
-
-
Method Details
-
getAt
Returns the value to which this map maps the specified index. Returns null if the map contains no mapping for the given index.- Parameters:
key
- the property index, as one of the values in theINDICES
map.
-
isEmpty
public boolean isEmpty()Returnsfalse
if this map contains at least one element, ortrue
otherwise. -
size
public int size()Returns the number of non-null properties in this map. -
get
Returns the value to which this map maps the specified key. Returnsnull
if the map contains no mapping for this key. -
entryIterator
Iterates over theKEYS
, returning only the entry having a non-null value.- Specified by:
entryIterator
in classAbstractMap<String,
Object> - Returns:
- an iterator over the entries in this map, or
null
.
-