Class FeatureMapImpl<K,V>
- Type Parameters:
K-V-
- All Implemented Interfaces:
Iterable<Map.Entry<Set<K>,V>>, Collection<Map.Entry<Set<K>, V>>, FeatureMap<K, V>
public class FeatureMapImpl<K,V>
extends AbstractCollection<Map.Entry<Set<K>,V>>
implements FeatureMap<K,V>
Map a set of features to a single value.
In
- Author:
- raven
-
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionentrySet()Collection<Map.Entry<Set<K>, V>> getIfSubsetOf(Set<K> prototype) Collection<Map.Entry<Set<K>, V>> getIfSupersetOf(Set<K> prototype) Return every entry of this featureMap whose associated feature set is a super set of the given one.getTagSets(Object v) iterator()keySet()voidbooleanbooleanintsize()toString()values()Methods inherited from class AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, removeAll, retainAll, toArray, toArrayMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, parallelStream, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArray, toArrayMethods inherited from interface FeatureMap
forEach
-
Field Details
-
tagToCount
-
tagToTagSets
-
tagSetToValues
-
valueToTagSets
-
-
Constructor Details
-
FeatureMapImpl
public FeatureMapImpl()
-
-
Method Details
-
keySet
-
values
- Specified by:
valuesin interfaceFeatureMap<K,V>
-
entrySet
- Specified by:
entrySetin interfaceFeatureMap<K,V>
-
put
-
remove
- Specified by:
removein interfaceCollection<K>- Specified by:
removein interfaceFeatureMap<K,V> - Overrides:
removein classAbstractCollection<Map.Entry<Set<K>,V>>
-
getIfSupersetOf
Return every entry of this featureMap whose associated feature set is a super set of the given one.- Specified by:
getIfSupersetOfin interfaceFeatureMap<K,V> - Returns:
-
getIfSubsetOf
- Specified by:
getIfSubsetOfin interfaceFeatureMap<K,V>
-
toString
-
iterator
-
size
public int size()- Specified by:
sizein interfaceCollection<K>- Specified by:
sizein classAbstractCollection<Map.Entry<Set<K>,V>>
-
get
- Specified by:
getin interfaceFeatureMap<K,V>
-
removeValue
- Specified by:
removeValuein interfaceFeatureMap<K,V>
-
getTagSets
- Specified by:
getTagSetsin interfaceFeatureMap<K,V>
-