Drools :: Core 6.1.0.Beta1

org.drools.core.factmodel.traits
Class TypeHierarchy<T,J extends LatticeElement<T>>

java.lang.Object
  extended by org.drools.core.util.AbstractBitwiseHierarchyImpl<T,J>
      extended by org.drools.core.factmodel.traits.TypeHierarchy<T,J>
All Implemented Interfaces:
Externalizable, Serializable, TypeLattice<T>, CodedHierarchy<T>
Direct Known Subclasses:
TraitField.DefaultValueHierarchy, TraitTypeMap

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.core.util.AbstractBitwiseHierarchyImpl
AbstractBitwiseHierarchyImpl.HierCodeComparator
 
Field Summary
 
Fields inherited from class org.drools.core.util.AbstractBitwiseHierarchyImpl
fixedRoot, line
 
Constructor Summary
TypeHierarchy()
           
 
Method Summary
 void addMember(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)
           
 BitSet getBottomCode()
           
protected  J getNode(T name)
           
 BitSet getTopCode()
           
protected  Collection<T> parentValues(J node)
           
 void readExternal(ObjectInput objectInput)
           
 void setBottomCode(BitSet bottom)
           
 void setTopCode(BitSet top)
           
 String toString()
           
protected abstract  J wrap(T val, BitSet key)
           
 void writeExternal(ObjectOutput objectOutput)
           
 
Methods inherited from class org.drools.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, supersetOrEqualset, 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
 

Constructor Detail

TypeHierarchy

public TypeHierarchy()
Method Detail

getNode

protected J getNode(T name)
Specified by:
getNode in class AbstractBitwiseHierarchyImpl<T,J extends LatticeElement<T>>

writeExternal

public void writeExternal(ObjectOutput objectOutput)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class AbstractBitwiseHierarchyImpl<T,J extends LatticeElement<T>>
Throws:
IOException

readExternal

public void readExternal(ObjectInput objectInput)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class AbstractBitwiseHierarchyImpl<T,J extends LatticeElement<T>>
Throws:
IOException
ClassNotFoundException

toString

public String toString()
Overrides:
toString in class Object

getTopCode

public BitSet getTopCode()
Specified by:
getTopCode in interface TypeLattice<T>

getBottomCode

public BitSet getBottomCode()
Specified by:
getBottomCode in interface TypeLattice<T>

setBottomCode

public void setBottomCode(BitSet bottom)
Specified by:
setBottomCode in interface TypeLattice<T>

setTopCode

public void setTopCode(BitSet top)
Specified by:
setTopCode in interface TypeLattice<T>

addMember

public void addMember(T val,
                      BitSet key)
Specified by:
addMember in interface CodedHierarchy<T>

wrap

protected abstract J wrap(T val,
                          BitSet key)

parentValues

protected Collection<T> parentValues(J node)
Specified by:
parentValues in class AbstractBitwiseHierarchyImpl<T,J extends LatticeElement<T>>

children

public Collection<T> children(T y)
Specified by:
children in interface CodedHierarchy<T>

descendants

public Collection<T> descendants(T y)
Specified by:
descendants in interface CodedHierarchy<T>

children

public Collection<T> children(BitSet key)
Specified by:
children in interface CodedHierarchy<T>

descendants

public Collection<T> descendants(BitSet key)
Specified by:
descendants in interface CodedHierarchy<T>

ancestors

public Collection<T> ancestors(T x)
Specified by:
ancestors in interface CodedHierarchy<T>

ancestors

public Collection<T> ancestors(BitSet key)
Specified by:
ancestors in interface CodedHierarchy<T>

Drools :: Core 6.1.0.Beta1

Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.