org.drools.factmodel.traits
Class TraitTypeMap<T extends String,K extends Thing<C>,C>
java.lang.Object
org.drools.util.AbstractCodedHierarchyImpl<T>
org.drools.factmodel.traits.TypeHierarchy<Key<Thing<C>>>
org.drools.factmodel.traits.TraitTypeMap<T,K,C>
- All Implemented Interfaces:
- Externalizable, Serializable, Map<String,Thing<C>>, TypeLattice<Key<Thing<C>>>, CodedHierarchy<Key<Thing<C>>>
public class TraitTypeMap<T extends String,K extends Thing<C>,C>
- extends TypeHierarchy<Key<Thing<C>>>
- implements Map<String,Thing<C>>, Externalizable
- See Also:
- Serialized Form
| Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
| Methods inherited from class org.drools.util.AbstractCodedHierarchyImpl |
add, addMember, ancestorNodes, ancestors, ancestors, ancestorValues, children, children, childrenValues, contains, descendantNodes, descendants, descendants, descendantValues, getCode, getMember, getNodeByKey, getNodes, getSortedMap, getSortedMembers, hasKey, immediateChildren, immediateParents, joinCode, jointMembersCode, lowerBorder, lowerDescendants, meetCode, metMembersCode, numBit, parents, parents, parentValues, remove, removeMember, removeMember, stringToBitSet, supersetOrEqualset, toBinaryString, toBinaryString, upperAncestors, upperBorder |
| Methods inherited from interface org.drools.util.CodedHierarchy |
addMember, ancestors, ancestors, children, children, descendants, descendants, getCode, getMember, getSortedMap, getSortedMembers, hasKey, immediateChildren, immediateParents, joinCode, jointMembersCode, lowerBorder, lowerDescendants, meetCode, metMembersCode, parents, parents, removeMember, removeMember, upperAncestors, upperBorder |
TraitTypeMap
public TraitTypeMap()
TraitTypeMap
public TraitTypeMap(Map map)
size
public int size()
- Specified by:
size in interface Map<String,Thing<C>>- Specified by:
size in interface CodedHierarchy<Key<Thing<C>>>- Overrides:
size in class AbstractCodedHierarchyImpl<Key<Thing<C>>>
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in interface Map<String,Thing<C>>- Overrides:
isEmpty in class AbstractCodedHierarchyImpl<Key<Thing<C>>>
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey in interface Map<String,Thing<C>>
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValue in interface Map<String,Thing<C>>
get
public Thing<C> get(Object key)
- Specified by:
get in interface Map<String,Thing<C>>
put
public Thing<C> put(String key,
Thing<C> value)
- Specified by:
put in interface Map<String,Thing<C>>
setBottomCode
public void setBottomCode(BitSet code)
- Specified by:
setBottomCode in interface TypeLattice<Key<Thing<C>>>- Overrides:
setBottomCode in class TypeHierarchy<Key<Thing<C>>>
putSafe
public Thing<C> putSafe(String key,
Thing<C> value)
throws LogicalTypeInconsistencyException
- Throws:
LogicalTypeInconsistencyException
remove
public Thing<C> remove(Object key)
- Specified by:
remove in interface Map<String,Thing<C>>
removeCascade
public Collection<Thing<C>> removeCascade(String traitName)
removeCascade
public Collection<Thing<C>> removeCascade(BitSet code)
putAll
public void putAll(Map<? extends String,? extends Thing<C>> m)
- Specified by:
putAll in interface Map<String,Thing<C>>
clear
public void clear()
- Specified by:
clear in interface Map<String,Thing<C>>- Overrides:
clear in class AbstractCodedHierarchyImpl<Key<Thing<C>>>
keySet
public Set<String> keySet()
- Specified by:
keySet in interface Map<String,Thing<C>>
values
public Collection<Thing<C>> values()
- Specified by:
values in interface Map<String,Thing<C>>
entrySet
public Set<Map.Entry<String,Thing<C>>> entrySet()
- Specified by:
entrySet in interface Map<String,Thing<C>>
toString
public String toString()
- Overrides:
toString in class TypeHierarchy<Key<Thing<C>>>
writeExternal
public void writeExternal(ObjectOutput objectOutput)
throws IOException
- Specified by:
writeExternal in interface Externalizable- Overrides:
writeExternal in class TypeHierarchy<Key<Thing<C>>>
- Throws:
IOException
readExternal
public void readExternal(ObjectInput objectInput)
throws IOException,
ClassNotFoundException
- Specified by:
readExternal in interface Externalizable- Overrides:
readExternal in class TypeHierarchy<Key<Thing<C>>>
- Throws:
IOException
ClassNotFoundException
getMostSpecificTraits
public Collection<Key<Thing<C>>> getMostSpecificTraits()
getCurrentTypeCode
public BitSet getCurrentTypeCode()
Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.