Google Data APIs Client Library (1.41.1)



com.google.gdata.data
Class AttributeGenerator

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<K,V>
          extended by java.util.LinkedHashMap<java.lang.String,java.lang.String>
              extended by com.google.gdata.data.AttributeGenerator
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,java.lang.String>

public class AttributeGenerator
extends java.util.LinkedHashMap<java.lang.String,java.lang.String>

Helps generate tag attributes, preserving the order of the attributes. Attributes whose the value is null are ignored when generating XML.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
AttributeGenerator()
           
 
Method Summary
 java.lang.String getContent()
           
 void put(java.lang.String key, boolean value)
          Associates the specified boolean value with the specified key in this map.
 void put(java.lang.String key, double value)
          Associates the specified double value with the specified key in this map.
 void put(java.lang.String key, float value)
          Associates the specified float value with the specified key in this map.
 void put(java.lang.String key, long value)
          Associates the specified long value with the specified key in this map.
 void put(java.lang.String key, java.lang.Object value)
          Associates the specified Object's AbstractMap.toString() value with the specified key in this map.
<T extends java.lang.Enum<T>>
void
put(java.lang.String key, T value, AttributeHelper.EnumToAttributeValue<T> enumToAttributeValue)
          Associates the specified enum value with the specified key in this map.
 void setContent(java.lang.String content)
           
 
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, get, removeEldestEntry
 
Methods inherited from class java.util.HashMap
clone, containsKey, entrySet, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
containsKey, entrySet, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Constructor Detail

AttributeGenerator

public AttributeGenerator()
Method Detail

getContent

public java.lang.String getContent()

setContent

public void setContent(java.lang.String content)

put

public void put(java.lang.String key,
                long value)
Associates the specified long value with the specified key in this map. If the map previously contained a mapping for this key, the old value is replaced.

Parameters:
key - key with which the specified value is to be associated
value - long value to be associated with the specified key

put

public void put(java.lang.String key,
                boolean value)
Associates the specified boolean value with the specified key in this map. If the map previously contained a mapping for this key, the old value is replaced.

Parameters:
key - key with which the specified value is to be associated
value - boolean value to be associated with the specified key

put

public void put(java.lang.String key,
                float value)
Associates the specified float value with the specified key in this map. If the map previously contained a mapping for this key, the old value is replaced.

Parameters:
key - key with which the specified value is to be associated
value - float value to be associated with the specified key

put

public void put(java.lang.String key,
                double value)
Associates the specified double value with the specified key in this map. If the map previously contained a mapping for this key, the old value is replaced.

Parameters:
key - key with which the specified value is to be associated
value - double value to be associated with the specified key

put

public void put(java.lang.String key,
                java.lang.Object value)
Associates the specified Object's AbstractMap.toString() value with the specified key in this map. If the map previously contained a mapping for this key, the old value is replaced.

Parameters:
key - key with which the specified value is to be associated
value - Object whose AbstractMap.toString() value is to be associated with the specified key or null

put

public <T extends java.lang.Enum<T>> void put(java.lang.String key,
                                              T value,
                                              AttributeHelper.EnumToAttributeValue<T> enumToAttributeValue)
Associates the specified enum value with the specified key in this map. If the map previously contained a mapping for this key, the old value is replaced.

Parameters:
key - key with which the specified value is to be associated
value - enum value to be associated with the specified key or null
enumToAttributeValue - custom mapping of enum to attribute value