org.progressmining.xeslite.external.store.mapdb
Class XMapDBAttributeMap

java.lang.Object
  extended by org.progressmining.xeslite.external.store.mapdb.XMapDBAttributeMap
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map<java.lang.String,org.deckfour.xes.model.XAttribute>, org.deckfour.xes.model.XAttributeMap
Direct Known Subclasses:
XMapDBCachingAttributeMap

public class XMapDBAttributeMap
extends java.lang.Object
implements org.deckfour.xes.model.XAttributeMap

Implements the XAttributeMap interface using a ConcurrentNavigableMap from MapDB as backend. This implementation tries to forward most operations directly to the backing map to avoid unnecessary copies. An exception is the method entrySet() that returns an immutable copy of the attributes, so better use values() and use the method XAttributeExternalImpl.getKey() to get the key of the attribute.

Author:
F. Mannhardt

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Field Summary
protected  XExternalAttributable owner
           
protected  XAttributeMapDBStore store
           
 
Constructor Summary
XMapDBAttributeMap(XExternalAttributable owner, XAttributeMapDBStore store)
           
 
Method Summary
 void clear()
           
 java.lang.Object clone()
           
 boolean containsKey(java.lang.Object key)
           
 boolean containsValue(java.lang.Object value)
           
 java.util.Set<java.util.Map.Entry<java.lang.String,org.deckfour.xes.model.XAttribute>> entrySet()
           
 org.deckfour.xes.model.XAttribute get(java.lang.Object key)
           
 boolean isEmpty()
           
 java.util.Set<java.lang.String> keySet()
           
 org.deckfour.xes.model.XAttribute put(java.lang.String key, org.deckfour.xes.model.XAttribute value)
           
 void putAll(java.util.Map<? extends java.lang.String,? extends org.deckfour.xes.model.XAttribute> m)
           
 org.deckfour.xes.model.XAttribute remove(java.lang.Object key)
           
 int size()
           
 java.util.Collection<org.deckfour.xes.model.XAttribute> values()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

owner

protected final XExternalAttributable owner

store

protected final XAttributeMapDBStore store
Constructor Detail

XMapDBAttributeMap

public XMapDBAttributeMap(XExternalAttributable owner,
                          XAttributeMapDBStore store)
Method Detail

clear

public void clear()
Specified by:
clear in interface java.util.Map<java.lang.String,org.deckfour.xes.model.XAttribute>

containsKey

public boolean containsKey(java.lang.Object key)
Specified by:
containsKey in interface java.util.Map<java.lang.String,org.deckfour.xes.model.XAttribute>

containsValue

public boolean containsValue(java.lang.Object value)
Specified by:
containsValue in interface java.util.Map<java.lang.String,org.deckfour.xes.model.XAttribute>

entrySet

public java.util.Set<java.util.Map.Entry<java.lang.String,org.deckfour.xes.model.XAttribute>> entrySet()
Specified by:
entrySet in interface java.util.Map<java.lang.String,org.deckfour.xes.model.XAttribute>

get

public org.deckfour.xes.model.XAttribute get(java.lang.Object key)
Specified by:
get in interface java.util.Map<java.lang.String,org.deckfour.xes.model.XAttribute>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Map<java.lang.String,org.deckfour.xes.model.XAttribute>

keySet

public java.util.Set<java.lang.String> keySet()
Specified by:
keySet in interface java.util.Map<java.lang.String,org.deckfour.xes.model.XAttribute>

put

public org.deckfour.xes.model.XAttribute put(java.lang.String key,
                                             org.deckfour.xes.model.XAttribute value)
Specified by:
put in interface java.util.Map<java.lang.String,org.deckfour.xes.model.XAttribute>

putAll

public void putAll(java.util.Map<? extends java.lang.String,? extends org.deckfour.xes.model.XAttribute> m)
Specified by:
putAll in interface java.util.Map<java.lang.String,org.deckfour.xes.model.XAttribute>

remove

public org.deckfour.xes.model.XAttribute remove(java.lang.Object key)
Specified by:
remove in interface java.util.Map<java.lang.String,org.deckfour.xes.model.XAttribute>

size

public int size()
Specified by:
size in interface java.util.Map<java.lang.String,org.deckfour.xes.model.XAttribute>

values

public java.util.Collection<org.deckfour.xes.model.XAttribute> values()
Specified by:
values in interface java.util.Map<java.lang.String,org.deckfour.xes.model.XAttribute>

clone

public java.lang.Object clone()
Specified by:
clone in interface org.deckfour.xes.model.XAttributeMap
Overrides:
clone in class java.lang.Object