org.apache.abdera.i18n.templates
Class HashMapContext

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<String,Object>
          extended by org.apache.abdera.i18n.templates.HashMapContext
All Implemented Interfaces:
Serializable, Cloneable, Iterable<String>, Map<String,Object>, Context

public final class HashMapContext
extends HashMap<String,Object>
implements Context

Context implementation based on a HashMap

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
HashMapContext()
           
HashMapContext(Map<String,Object> map)
           
HashMapContext(Map<String,Object> map, boolean isiri)
           
 
Method Summary
 boolean equals(Object obj)
           
 int hashCode()
           
 boolean isIri()
          True if IRI expansion is enabled
 boolean isNormalizing()
           
 Iterator<String> iterator()
           
<T> T
resolve(String var)
          Resolve a value for the specified variable.
 void setIri(boolean isiri)
          True if IRI expansion is to be enabled
 void setNormalizing(boolean normalizing)
           
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.abdera.i18n.templates.Context
clear
 

Constructor Detail

HashMapContext

public HashMapContext()

HashMapContext

public HashMapContext(Map<String,Object> map)

HashMapContext

public HashMapContext(Map<String,Object> map,
                      boolean isiri)
Method Detail

resolve

public <T> T resolve(String var)
Description copied from interface: Context
Resolve a value for the specified variable. The method can return either a String, an Array or a Collection.

Specified by:
resolve in interface Context

isIri

public boolean isIri()
Description copied from interface: Context
True if IRI expansion is enabled

Specified by:
isIri in interface Context

setIri

public void setIri(boolean isiri)
Description copied from interface: Context
True if IRI expansion is to be enabled

Specified by:
setIri in interface Context

iterator

public Iterator<String> iterator()
Specified by:
iterator in interface Iterable<String>

hashCode

public int hashCode()
Specified by:
hashCode in interface Map<String,Object>
Overrides:
hashCode in class AbstractMap<String,Object>

equals

public boolean equals(Object obj)
Specified by:
equals in interface Map<String,Object>
Overrides:
equals in class AbstractMap<String,Object>

isNormalizing

public boolean isNormalizing()

setNormalizing

public void setNormalizing(boolean normalizing)


Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.