org.terrier.structures.collections
Class ReadOnlyMap<K,V>

java.lang.Object
  extended by org.terrier.structures.collections.ReadOnlyMap<K,V>
Type Parameters:
K - Type of the keys
V - Type of the values
All Implemented Interfaces:
Map<K,V>
Direct Known Subclasses:
FSOrderedMapFile

public abstract class ReadOnlyMap<K,V>
extends Object
implements Map<K,V>

A null implementation of java.util.Map that does nothing.

Since:
3.0
Author:
Craig Macdonald

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
ReadOnlyMap()
           
 
Method Summary
 void clear()
          Remove all entries from this map
 V put(K key, V value)
          
 V remove(Object _key)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, putAll, size, values
 

Constructor Detail

ReadOnlyMap

public ReadOnlyMap()
Method Detail

clear

public void clear()
Remove all entries from this map

Specified by:
clear in interface Map<K,V>

put

public V put(K key,
             V value)

Specified by:
put in interface Map<K,V>

remove

public V remove(Object _key)

Specified by:
remove in interface Map<K,V>


Terrier 3.6. Copyright © 2004-2011 University of Glasgow