public abstract class AbstractBitwiseHierarchyImpl<H,J extends LatticeElement<H>> extends Object implements Externalizable, CodedHierarchy<H>
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AbstractBitwiseHierarchyImpl.HierCodeComparator |
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
fixedRoot |
protected SortedMap<BitSet,J> |
line |
| Constructor and Description |
|---|
AbstractBitwiseHierarchyImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
add(J node) |
void |
clear() |
protected boolean |
contains(J node) |
BitSet |
getCode(H val) |
H |
getMember(BitSet key) |
protected abstract J |
getNode(H name) |
protected J |
getNodeByKey(BitSet key) |
protected Collection<J> |
getNodes() |
Map<H,BitSet> |
getSortedMap() |
List<H> |
getSortedMembers() |
boolean |
hasKey(BitSet key) |
Collection<H> |
immediateChildren(BitSet key)
* Return the "ceiling" of the key's descendants, excluding the element whose code is key, if any
|
Collection<H> |
immediateParents(BitSet key)
Return the "floor" of the key's ancetsors, down to and excluding the element whose code is key
|
boolean |
isEmpty() |
BitSet |
joinCode(Collection<BitSet> codes) |
BitSet |
jointMembersCode(Collection<H> vals) |
Collection<H> |
lowerBorder(BitSet key)
Return the "ceiling" of the key's descendants, up to and including the element whose code is key
|
Collection<H> |
lowerDescendants(BitSet key)
Returns all elements whose code is a descendant of key
|
BitSet |
meetCode(Collection<BitSet> codes) |
BitSet |
metMembersCode(Collection<H> vals) |
protected int |
numBit(BitSet x) |
Collection<H> |
parents(BitSet x) |
Collection<H> |
parents(H x) |
protected abstract Collection<H> |
parentValues(J node) |
void |
readExternal(ObjectInput objectInput) |
protected void |
remove(J node) |
void |
removeMember(BitSet key) |
void |
removeMember(H val) |
int |
size() |
static BitSet |
stringToBitSet(String s) |
int |
superset(BitSet n1,
BitSet n2) |
static boolean |
supersetOrEqualset(BitSet n1,
BitSet n2) |
protected String |
toBinaryString(BitSet mask) |
protected String |
toBinaryString(BitSet mask,
int len) |
Collection<H> |
upperAncestors(BitSet key)
Returns all elements whose code is an ancestor of key
|
Collection<H> |
upperBorder(BitSet key)
Return the "floor" of the key's ancestors, down to and including the element whose code is key, if any
|
void |
writeExternal(ObjectOutput objectOutput) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddMember, ancestors, ancestors, children, children, descendants, descendantsprotected SortedMap<BitSet,J extends LatticeElement<H>> line
protected boolean fixedRoot
public int size()
size in interface CodedHierarchy<H>protected void remove(J node)
protected boolean contains(J node)
public BitSet getCode(H val)
getCode in interface CodedHierarchy<H>public BitSet metMembersCode(Collection<H> vals)
metMembersCode in interface CodedHierarchy<H>public BitSet jointMembersCode(Collection<H> vals)
jointMembersCode in interface CodedHierarchy<H>public BitSet meetCode(Collection<BitSet> codes)
meetCode in interface CodedHierarchy<H>public BitSet joinCode(Collection<BitSet> codes)
joinCode in interface CodedHierarchy<H>public List<H> getSortedMembers()
getSortedMembers in interface CodedHierarchy<H>public Collection<H> upperAncestors(BitSet key)
CodedHierarchyupperAncestors in interface CodedHierarchy<H>public Collection<H> lowerBorder(BitSet key)
CodedHierarchylowerBorder in interface CodedHierarchy<H>key - a key, possibly the meet of a number of member keyspublic Collection<H> immediateChildren(BitSet key)
CodedHierarchyimmediateChildren in interface CodedHierarchy<H>key - a key, possibly the meet of a number of member keysprotected int numBit(BitSet x)
public void writeExternal(ObjectOutput objectOutput) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput objectInput) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic void removeMember(H val)
removeMember in interface CodedHierarchy<H>public void removeMember(BitSet key)
removeMember in interface CodedHierarchy<H>public Map<H,BitSet> getSortedMap()
getSortedMap in interface CodedHierarchy<H>public boolean hasKey(BitSet key)
hasKey in interface CodedHierarchy<H>public Collection<H> lowerDescendants(BitSet key)
CodedHierarchylowerDescendants in interface CodedHierarchy<H>protected abstract Collection<H> parentValues(J node)
public Collection<H> parents(H x)
parents in interface CodedHierarchy<H>public Collection<H> parents(BitSet x)
parents in interface CodedHierarchy<H>public Collection<H> upperBorder(BitSet key)
CodedHierarchyupperBorder in interface CodedHierarchy<H>key - a key, possibly the meet of a number of member keyspublic Collection<H> immediateParents(BitSet key)
CodedHierarchyimmediateParents in interface CodedHierarchy<H>key - a key, possibly the meet of a number of member keyspublic boolean isEmpty()
public void clear()
protected void add(J node)
protected Collection<J> getNodes()
public H getMember(BitSet key)
getMember in interface CodedHierarchy<H>Copyright © 2001–2015 JBoss by Red Hat. All rights reserved.