Package org.drools.traits.core.factmodel
Interface CodedHierarchy<T>
-
- All Known Subinterfaces:
HierarchyEncoder<T>,TypeLattice<T>
- All Known Implementing Classes:
AbstractBitwiseHierarchyImpl,AbstractCodedHierarchyImpl,CodedHierarchyImpl,HierarchyEncoderImpl,IndexedTypeHierarchy,TraitFieldImpl.DefaultValueHierarchy,TraitRegistryImpl.CachingHierarcyEncoderImpl,TraitTypeMapImpl,TypeHierarchy
public interface CodedHierarchy<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddMember(T val, java.util.BitSet key)java.util.Collection<T>ancestors(java.util.BitSet key)java.util.Collection<T>ancestors(T x)java.util.Collection<T>children(java.util.BitSet key)java.util.Collection<T>children(T y)java.util.Collection<T>descendants(java.util.BitSet key)java.util.Collection<T>descendants(T y)java.util.BitSetgetCode(T val)TgetMember(java.util.BitSet key)java.util.Map<T,java.util.BitSet>getSortedMap()java.util.List<T>getSortedMembers()booleanhasKey(java.util.BitSet key)java.util.Collection<T>immediateChildren(java.util.BitSet key)* Return the "ceiling" of the key's descendants, excluding the element whose code is key, if anyjava.util.Collection<T>immediateParents(java.util.BitSet key)Return the "floor" of the key's ancetsors, down to and excluding the element whose code is keyjava.util.BitSetjoinCode(java.util.Collection<java.util.BitSet> codes)java.util.BitSetjointMembersCode(java.util.Collection<T> vals)java.util.Collection<T>lowerBorder(java.util.BitSet key)Return the "ceiling" of the key's descendants, up to and including the element whose code is keyjava.util.Collection<T>lowerDescendants(java.util.BitSet key)Returns all elements whose code is a descendant of keyjava.util.BitSetmeetCode(java.util.Collection<java.util.BitSet> codes)java.util.BitSetmetMembersCode(java.util.Collection<T> vals)java.util.Collection<T>parents(java.util.BitSet x)java.util.Collection<T>parents(T x)voidremoveMember(java.util.BitSet key)voidremoveMember(T val)intsize()java.util.Collection<T>upperAncestors(java.util.BitSet key)Returns all elements whose code is an ancestor of keyjava.util.Collection<T>upperBorder(java.util.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, java.util.BitSet key)
-
removeMember
void removeMember(T val)
-
removeMember
void removeMember(java.util.BitSet key)
-
getCode
java.util.BitSet getCode(T val)
-
metMembersCode
java.util.BitSet metMembersCode(java.util.Collection<T> vals)
-
jointMembersCode
java.util.BitSet jointMembersCode(java.util.Collection<T> vals)
-
meetCode
java.util.BitSet meetCode(java.util.Collection<java.util.BitSet> codes)
-
joinCode
java.util.BitSet joinCode(java.util.Collection<java.util.BitSet> codes)
-
getSortedMembers
java.util.List<T> getSortedMembers()
-
getSortedMap
java.util.Map<T,java.util.BitSet> getSortedMap()
-
getMember
T getMember(java.util.BitSet key)
-
hasKey
boolean hasKey(java.util.BitSet key)
-
children
java.util.Collection<T> children(java.util.BitSet key)
-
descendants
java.util.Collection<T> descendants(java.util.BitSet key)
-
lowerBorder
java.util.Collection<T> lowerBorder(java.util.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
java.util.Collection<T> immediateChildren(java.util.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
java.util.Collection<T> lowerDescendants(java.util.BitSet key)
Returns all elements whose code is a descendant of key- Parameters:
key-- Returns:
-
parents
java.util.Collection<T> parents(java.util.BitSet x)
-
ancestors
java.util.Collection<T> ancestors(java.util.BitSet key)
-
upperBorder
java.util.Collection<T> upperBorder(java.util.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
java.util.Collection<T> immediateParents(java.util.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
java.util.Collection<T> upperAncestors(java.util.BitSet key)
Returns all elements whose code is an ancestor of key- Parameters:
key-- Returns:
-
-