Package org.drools.traits.core.factmodel
Class TypeHierarchy<T,J extends LatticeElement<T>>
- java.lang.Object
-
- org.drools.traits.core.util.AbstractBitwiseHierarchyImpl<T,J>
-
- org.drools.traits.core.factmodel.TypeHierarchy<T,J>
-
- All Implemented Interfaces:
Externalizable,Serializable,org.drools.core.util.CodedHierarchy<T>,TypeLattice<T>
- Direct Known Subclasses:
TraitFieldImpl.DefaultValueHierarchy,TraitTypeMapImpl
public abstract class TypeHierarchy<T,J extends LatticeElement<T>> extends AbstractBitwiseHierarchyImpl<T,J> implements TypeLattice<T>, Externalizable
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.drools.traits.core.util.AbstractBitwiseHierarchyImpl
AbstractBitwiseHierarchyImpl.HierCodeComparator
-
-
Field Summary
-
Fields inherited from class org.drools.traits.core.util.AbstractBitwiseHierarchyImpl
fixedRoot, line
-
-
Constructor Summary
Constructors Constructor Description TypeHierarchy()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddMember(T val, BitSet key)Collection<T>ancestors(BitSet key)Collection<T>ancestors(T x)Collection<T>children(BitSet key)Collection<T>children(T y)Collection<T>descendants(BitSet key)Collection<T>descendants(T y)BitSetgetBottomCode()protected JgetNode(T name)BitSetgetTopCode()protected Collection<T>parentValues(J node)voidreadExternal(ObjectInput objectInput)voidsetBottomCode(BitSet bottom)voidsetTopCode(BitSet top)StringtoString()protected abstract Jwrap(T val, BitSet key)voidwriteExternal(ObjectOutput objectOutput)-
Methods inherited from class org.drools.traits.core.util.AbstractBitwiseHierarchyImpl
add, clear, contains, getCode, getMember, getNodeByKey, getNodes, getSortedMap, getSortedMembers, hasKey, immediateChildren, immediateParents, isEmpty, joinCode, jointMembersCode, lowerBorder, lowerDescendants, meetCode, metMembersCode, numBit, parents, parents, remove, removeMember, removeMember, size, stringToBitSet, superset, toBinaryString, toBinaryString, upperAncestors, upperBorder
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.drools.core.util.CodedHierarchy
getCode, getMember, getSortedMap, getSortedMembers, hasKey, immediateChildren, immediateParents, joinCode, jointMembersCode, lowerBorder, lowerDescendants, meetCode, metMembersCode, parents, parents, removeMember, removeMember, size, upperAncestors, upperBorder
-
-
-
-
Method Detail
-
getNode
protected J getNode(T name)
- Specified by:
getNodein classAbstractBitwiseHierarchyImpl<T,J extends LatticeElement<T>>
-
writeExternal
public void writeExternal(ObjectOutput objectOutput) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Overrides:
writeExternalin classAbstractBitwiseHierarchyImpl<T,J extends LatticeElement<T>>- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput objectInput) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Overrides:
readExternalin classAbstractBitwiseHierarchyImpl<T,J extends LatticeElement<T>>- Throws:
IOExceptionClassNotFoundException
-
getTopCode
public BitSet getTopCode()
- Specified by:
getTopCodein interfaceTypeLattice<T>
-
getBottomCode
public BitSet getBottomCode()
- Specified by:
getBottomCodein interfaceTypeLattice<T>
-
setBottomCode
public void setBottomCode(BitSet bottom)
- Specified by:
setBottomCodein interfaceTypeLattice<T>
-
setTopCode
public void setTopCode(BitSet top)
- Specified by:
setTopCodein interfaceTypeLattice<T>
-
addMember
public void addMember(T val, BitSet key)
- Specified by:
addMemberin interfaceorg.drools.core.util.CodedHierarchy<T>
-
parentValues
protected Collection<T> parentValues(J node)
- Specified by:
parentValuesin classAbstractBitwiseHierarchyImpl<T,J extends LatticeElement<T>>
-
children
public Collection<T> children(T y)
- Specified by:
childrenin interfaceorg.drools.core.util.CodedHierarchy<T>
-
descendants
public Collection<T> descendants(T y)
- Specified by:
descendantsin interfaceorg.drools.core.util.CodedHierarchy<T>
-
children
public Collection<T> children(BitSet key)
- Specified by:
childrenin interfaceorg.drools.core.util.CodedHierarchy<T>
-
descendants
public Collection<T> descendants(BitSet key)
- Specified by:
descendantsin interfaceorg.drools.core.util.CodedHierarchy<T>
-
ancestors
public Collection<T> ancestors(T x)
- Specified by:
ancestorsin interfaceorg.drools.core.util.CodedHierarchy<T>
-
ancestors
public Collection<T> ancestors(BitSet key)
- Specified by:
ancestorsin interfaceorg.drools.core.util.CodedHierarchy<T>
-
-