Package org.drools.traits.core.util
Class AbstractBitwiseHierarchyImpl<H,J extends LatticeElement<H>>
java.lang.Object
org.drools.traits.core.util.AbstractBitwiseHierarchyImpl<H,J>
- All Implemented Interfaces:
Externalizable,Serializable,CodedHierarchy<H>
- Direct Known Subclasses:
AbstractCodedHierarchyImpl,TypeHierarchy
public abstract class AbstractBitwiseHierarchyImpl<H,J extends LatticeElement<H>>
extends Object
implements Externalizable, CodedHierarchy<H>
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidclear()protected booleanprotected abstract Jprotected JgetNodeByKey(BitSet key) protected Collection<J>getNodes()booleanimmediateChildren(BitSet key) * Return the "ceiling" of the key's descendants, excluding the element whose code is key, if anyimmediateParents(BitSet key) Return the "floor" of the key's ancetsors, down to and excluding the element whose code is keybooleanisEmpty()joinCode(Collection<BitSet> codes) jointMembersCode(Collection<H> vals) lowerBorder(BitSet key) Return the "ceiling" of the key's descendants, up to and including the element whose code is keylowerDescendants(BitSet key) Returns all elements whose code is a descendant of keymeetCode(Collection<BitSet> codes) metMembersCode(Collection<H> vals) protected intprotected abstract Collection<H>parentValues(J node) voidreadExternal(ObjectInput objectInput) protected voidvoidremoveMember(H val) voidremoveMember(BitSet key) intsize()static BitSetintprotected StringtoBinaryString(BitSet mask) protected StringtoBinaryString(BitSet mask, int len) upperAncestors(BitSet key) Returns all elements whose code is an ancestor of keyupperBorder(BitSet key) Return the "floor" of the key's ancestors, down to and including the element whose code is key, if anyvoidwriteExternal(ObjectOutput objectOutput) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.drools.traits.core.factmodel.CodedHierarchy
addMember, ancestors, ancestors, children, children, descendants, descendants
-
Field Details
-
line
-
fixedRoot
protected boolean fixedRoot
-
-
Constructor Details
-
AbstractBitwiseHierarchyImpl
public AbstractBitwiseHierarchyImpl()
-
-
Method Details
-
size
public int size()- Specified by:
sizein interfaceCodedHierarchy<H>
-
getNodeByKey
-
getNode
-
remove
-
contains
-
getCode
- Specified by:
getCodein interfaceCodedHierarchy<H>
-
metMembersCode
- Specified by:
metMembersCodein interfaceCodedHierarchy<H>
-
jointMembersCode
- Specified by:
jointMembersCodein interfaceCodedHierarchy<H>
-
meetCode
- Specified by:
meetCodein interfaceCodedHierarchy<H>
-
joinCode
- Specified by:
joinCodein interfaceCodedHierarchy<H>
-
getSortedMembers
- Specified by:
getSortedMembersin interfaceCodedHierarchy<H>
-
upperAncestors
Description copied from interface:CodedHierarchyReturns all elements whose code is an ancestor of key- Specified by:
upperAncestorsin interfaceCodedHierarchy<H>- Returns:
-
lowerBorder
Description copied from interface:CodedHierarchyReturn the "ceiling" of the key's descendants, up to and including the element whose code is key- Specified by:
lowerBorderin interfaceCodedHierarchy<H>- Parameters:
key- a key, possibly the meet of a number of member keys- Returns:
-
immediateChildren
Description copied from interface:CodedHierarchy* Return the "ceiling" of the key's descendants, excluding the element whose code is key, if any- Specified by:
immediateChildrenin interfaceCodedHierarchy<H>- Parameters:
key- a key, possibly the meet of a number of member keys- Returns:
-
toBinaryString
-
toBinaryString
-
superset
-
numBit
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
stringToBitSet
-
removeMember
- Specified by:
removeMemberin interfaceCodedHierarchy<H>
-
removeMember
- Specified by:
removeMemberin interfaceCodedHierarchy<H>
-
getSortedMap
- Specified by:
getSortedMapin interfaceCodedHierarchy<H>
-
hasKey
- Specified by:
hasKeyin interfaceCodedHierarchy<H>
-
lowerDescendants
Description copied from interface:CodedHierarchyReturns all elements whose code is a descendant of key- Specified by:
lowerDescendantsin interfaceCodedHierarchy<H>- Returns:
-
parentValues
-
parents
- Specified by:
parentsin interfaceCodedHierarchy<H>
-
parents
- Specified by:
parentsin interfaceCodedHierarchy<H>
-
upperBorder
Description copied from interface:CodedHierarchyReturn the "floor" of the key's ancestors, down to and including the element whose code is key, if any- Specified by:
upperBorderin interfaceCodedHierarchy<H>- Parameters:
key- a key, possibly the meet of a number of member keys- Returns:
-
immediateParents
Description copied from interface:CodedHierarchyReturn the "floor" of the key's ancetsors, down to and excluding the element whose code is key- Specified by:
immediateParentsin interfaceCodedHierarchy<H>- Parameters:
key- a key, possibly the meet of a number of member keys- Returns:
-
isEmpty
public boolean isEmpty() -
clear
public void clear() -
add
-
getNodes
-
getMember
- Specified by:
getMemberin interfaceCodedHierarchy<H>
-