Class GenericXml
java.lang.Object
java.util.AbstractMap<String,Object>
com.google.api.client.util.GenericData
com.google.api.client.xml.GenericXml
Beta Generic XML data that stores all unknown key name/value pairs.
Each data key name maps into the name of the XPath expression value for the XML element,
attribute, or text content (using "text()"). Subclasses can declare fields for known XML
content using the Key annotation. Each field can be of any visibility (private, package
private, protected, or public) and must not be static. null unknown data key names are
not allowed, but null data values are allowed.
Implementation is not thread-safe. For a thread-safe choice instead use an implementation of
ConcurrentMap.
- Since:
- 1.0
-
Nested Class Summary
Nested classes/interfaces inherited from class GenericData
GenericData.FlagsNested classes/interfaces inherited from class AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
FieldsModifier and TypeFieldDescriptionOptional XML element local name prefixed by its namespace alias -- for example"atom:entry"-- ornullif not set.Optional namespace dictionary ornullif not set. -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeysMethods inherited from class AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, valuesMethods inherited from interface Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
name
Optional XML element local name prefixed by its namespace alias -- for example"atom:entry"-- ornullif not set. -
namespaceDictionary
Optional namespace dictionary ornullif not set.
-
-
Constructor Details
-
GenericXml
public GenericXml()
-
-
Method Details
-
clone
Description copied from class:GenericDataMakes a "deep" clone of the generic data, in which the clone is completely independent of the original.- Overrides:
clonein classGenericData
-
toString
- Overrides:
toStringin classGenericData
-
set
Description copied from class:GenericDataSets the given field value (may benull) for the given field name. Any existing value for the field will be overwritten. It may be more slightly more efficient thanGenericData.put(String, Object)because it avoids accessing the field's original value.Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
- Overrides:
setin classGenericData
-