com.scit.sling.test
Class MockValueMap

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<K,V>
          extended by java.util.LinkedHashMap<String,Object>
              extended by com.scit.sling.test.MockValueMap
All Implemented Interfaces:
Serializable, Cloneable, Map<String,Object>, org.apache.sling.api.resource.ValueMap

public class MockValueMap
extends LinkedHashMap<String,Object>
implements org.apache.sling.api.resource.ValueMap

A Mock ValueMap that has some basic type conversion. Dates should be stored as DateTime objects.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
static org.joda.time.format.DateTimeFormatter DATE_TIME_FORMAT
           
 
Fields inherited from interface org.apache.sling.api.resource.ValueMap
EMPTY
 
Constructor Summary
MockValueMap()
           
 
Method Summary
<T> T
get(String name, Class<T> type)
           
<T> T
get(String name, T defaultValue)
           
 
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
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Field Detail

DATE_TIME_FORMAT

public static final org.joda.time.format.DateTimeFormatter DATE_TIME_FORMAT
Constructor Detail

MockValueMap

public MockValueMap()
Method Detail

get

public <T> T get(String name,
                 Class<T> type)
Specified by:
get in interface org.apache.sling.api.resource.ValueMap

get

public <T> T get(String name,
                 T defaultValue)
Specified by:
get in interface org.apache.sling.api.resource.ValueMap


Copyright © 2013 Southern Cross IT. All rights reserved.