public class AnnotationTermMap extends MapBase
A map from key type string
to value type AnnotationTerm
.
Uses the property and function naming conventions of the JavaScript Map object.
Modifier and Type | Class and Description |
---|---|
static class |
AnnotationTermMap.Entry
A key/value pair for map entries.
|
static class |
AnnotationTermMap.EntryList
A list of item type
AnnotationTermMap.Entry . |
Modifier and Type | Field and Description |
---|---|
static AnnotationTermMap |
empty |
Constructor and Description |
---|
AnnotationTermMap()
|
AnnotationTermMap(int capacity)
Construct a new map with
AnnotationTermMap.size of zero and optional initial capacity . |
Modifier and Type | Method and Description |
---|---|
void |
add(AnnotationTerm value)
Add an entry to this map using
value.localName as the entry key and value as the entry value. |
boolean |
delete(java.lang.String key)
Delete the entry with the specified
key (if found). |
AnnotationTermMap.EntryList |
entries()
Return a list of the entries (key/value pairs) in this map.
|
AnnotationTerm |
get(java.lang.String key)
Return (nullable) The value from the entry with the specified
key (if found), otherwise null . |
AnnotationTerm |
getRequired(java.lang.String key)
Return the value from the entry with the specified
key (if found). |
com.sap.cloud.server.odata.core.UntypedMap |
getUntypedMap()
Return the underlying untyped map of objects.
|
boolean |
has(java.lang.String key)
Return
true if this map has an entry with the specified key , otherwise false . |
StringList |
keys()
Return a list of the entry keys in this map.
|
void |
set(java.lang.String key,
AnnotationTerm value)
Add or replace an entry with the specified
key and value . |
AnnotationTermMap |
setThis(java.lang.String key,
AnnotationTerm value)
Add or replace an entry with the specified
key and value . |
AnnotationTermMap.EntryList |
sortedEntries()
Return the entries of this map sorted by key.
|
StringList |
sortedKeys()
Return the sorted keys of this map.
|
AnnotationTermList |
sortedValues()
Return the sorted values of this map.
|
AnnotationTermList |
values()
Return a list of the entry values in this map.
|
public static final AnnotationTermMap empty
public AnnotationTermMap()
public AnnotationTermMap(int capacity)
Construct a new map with AnnotationTermMap.size
of zero and optional initial capacity
.
A map can expand in size beyond its initial capacity, but best performance
will be obtained if the initial capacity is close to the map's maximum size.
capacity
- Optional initial capacity.public void add(AnnotationTerm value)
Add an entry to this map using value.localName
as the entry key and value
as the entry value.
value
- Value for new map entry.public boolean delete(java.lang.String key)
Delete the entry with the specified key
(if found).
key
- Entry key.true
if an entry with the specified key
was found (and deleted).public AnnotationTermMap.EntryList entries()
Return a list of the entries (key/value pairs) in this map.
public AnnotationTerm get(java.lang.String key)
Return (nullable) The value from the entry with the specified key
(if found), otherwise null
.
key
- Entry key.key
(if found), otherwise null
.public AnnotationTerm getRequired(java.lang.String key)
Return the value from the entry with the specified key
(if found).
MissingEntryException
if no entry is found for the specified key.
key
- Entry key.public com.sap.cloud.server.odata.core.UntypedMap getUntypedMap()
Return the underlying untyped map of objects. Use with care, avoiding the addition of objects with an incorrect item type.
getUntypedMap
in class MapBase
public boolean has(java.lang.String key)
Return true
if this map has an entry with the specified key
, otherwise false
.
key
- Entry key.true
if this map has an entry with the specified key
, otherwise false
.public StringList keys()
Return a list of the entry keys in this map.
public void set(java.lang.String key, AnnotationTerm value)
Add or replace an entry with the specified key
and value
.
value
- Entry value.key
- Entry key.public AnnotationTermMap setThis(java.lang.String key, AnnotationTerm value)
Add or replace an entry with the specified key
and value
.
key
- Entry key.value
- Entry value.public AnnotationTermMap.EntryList sortedEntries()
Return the entries of this map sorted by key.
public StringList sortedKeys()
Return the sorted keys of this map.
public AnnotationTermList sortedValues()
Return the sorted values of this map.
public AnnotationTermList values()
Return a list of the entry values in this map.