org.drools.util
Interface CodedHierarchy<T>

All Known Subinterfaces:
HierarchyEncoder<T>, TypeLattice<T>
All Known Implementing Classes:
AbstractCodedHierarchyImpl, CodedHierarchyImpl, HierarchyEncoderImpl, IndexedTypeHierarchy, TraitTypeMap, TypeHierarchy

public interface CodedHierarchy<T>


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 getCode(T val)
           
 T getMember(BitSet key)
           
 Map<T,BitSet> getSortedMap()
           
 List<T> getSortedMembers()
           
 boolean hasKey(BitSet key)
           
 Collection<T> immediateChildren(BitSet key)
          * Return the "ceiling" of the key's descendants, excluding the element whose code is key, if any
 Collection<T> immediateParents(BitSet key)
          Return the "floor" of the key's ancetsors, down to and excluding the element whose code is key
 BitSet joinCode(Collection<BitSet> codes)
           
 BitSet jointMembersCode(Collection<T> vals)
           
 Collection<T> lowerBorder(BitSet key)
          Return the "ceiling" of the key's descendants, up to and including the element whose code is key
 Collection<T> lowerDescendants(BitSet key)
          Returns all elements whose code is a descendant of key
 BitSet meetCode(Collection<BitSet> codes)
           
 BitSet metMembersCode(Collection<T> vals)
           
 Collection<T> parents(BitSet x)
           
 Collection<T> parents(T x)
           
 void removeMember(BitSet key)
           
 void removeMember(T val)
           
 int size()
           
 Collection<T> upperAncestors(BitSet key)
          Returns all elements whose code is an ancestor of key
 Collection<T> upperBorder(BitSet key)
          Return the "floor" of the key's ancestors, down to and including the element whose code is key, if any
 

Method Detail

size

int size()

addMember

void addMember(T val,
               BitSet key)

removeMember

void removeMember(T val)

removeMember

void removeMember(BitSet key)

getCode

BitSet getCode(T val)

metMembersCode

BitSet metMembersCode(Collection<T> vals)

jointMembersCode

BitSet jointMembersCode(Collection<T> vals)

meetCode

BitSet meetCode(Collection<BitSet> codes)

joinCode

BitSet joinCode(Collection<BitSet> codes)

getSortedMembers

List<T> getSortedMembers()

getSortedMap

Map<T,BitSet> getSortedMap()

getMember

T getMember(BitSet key)

hasKey

boolean hasKey(BitSet key)

children

Collection<T> children(T y)

descendants

Collection<T> descendants(T y)

children

Collection<T> children(BitSet key)

descendants

Collection<T> descendants(BitSet key)

lowerBorder

Collection<T> lowerBorder(BitSet key)
Return the "ceiling" of the key's descendants, up to and including the element whose code is key

Parameters:
key - a key, possibly the join of a number of member keys
Returns:

immediateChildren

Collection<T> immediateChildren(BitSet key)
* Return the "ceiling" of the key's descendants, excluding the element whose code is key, if any

Parameters:
key - a key, possibly the join of a number of member keys
Returns:

lowerDescendants

Collection<T> lowerDescendants(BitSet key)
Returns all elements whose code is a descendant of key

Parameters:
key -
Returns:

parents

Collection<T> parents(T x)

parents

Collection<T> parents(BitSet x)

ancestors

Collection<T> ancestors(T x)

ancestors

Collection<T> ancestors(BitSet key)

upperBorder

Collection<T> upperBorder(BitSet key)
Return the "floor" of the key's ancestors, down to and including the element whose code is key, if any

Parameters:
key - a key, possibly the meet of a number of member keys
Returns:

immediateParents

Collection<T> immediateParents(BitSet key)
Return the "floor" of the key's ancetsors, down to and excluding the element whose code is key

Parameters:
key - a key, possibly the meet of a number of member keys
Returns:

upperAncestors

Collection<T> upperAncestors(BitSet key)
Returns all elements whose code is an ancestor of key

Parameters:
key -
Returns:


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