Package net.sf.freecol.common.model
Class TypeCountMap<T extends FreeColSpecObjectType>
- java.lang.Object
-
- net.sf.freecol.common.model.TypeCountMap<T>
-
public class TypeCountMap<T extends FreeColSpecObjectType> extends java.lang.Object
A map that incorporates a count. FIXME: implement entire Map interface
-
-
Constructor Summary
Constructors Constructor Description TypeCountMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(TypeCountMap<T> other)
void
clear()
boolean
containsKey(T key)
int
getCount(T key)
java.util.Map<T,java.lang.Integer>
getValues()
java.lang.Integer
incrementCount(T key, int newCount)
boolean
isEmpty()
java.util.Set<T>
keySet()
void
putAll(TypeCountMap<T> other)
int
size()
java.lang.String
toString()
java.util.Collection<java.lang.Integer>
values()
-
-
-
Field Detail
-
values
private final java.util.Map<T extends FreeColSpecObjectType,java.lang.Integer> values
-
-
Method Detail
-
getValues
public java.util.Map<T,java.lang.Integer> getValues()
-
getCount
public int getCount(T key)
-
incrementCount
public java.lang.Integer incrementCount(T key, int newCount)
-
add
public void add(TypeCountMap<T> other)
-
clear
public void clear()
-
keySet
public java.util.Set<T> keySet()
-
values
public java.util.Collection<java.lang.Integer> values()
-
containsKey
public boolean containsKey(T key)
-
isEmpty
public boolean isEmpty()
-
size
public int size()
-
putAll
public void putAll(TypeCountMap<T> other)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-