|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--diva.sketch.parser2d.ConstituentSet
A set of constituents that supports 2D geometric queries. The 2D geometric queries are of the form "tell me all the constituents that have [a given spatial relation] to the given constituent". The format of the query is sufficiently abstract that it can eventually be rewritten to be more optimized without changing the interface.
Field Summary | |
(package private) Constituent[] |
_children
The constituents that this set contains. |
Constructor Summary | |
ConstituentSet(Constituent[] children)
Construct a set of the given constituents. |
Method Summary | |
java.util.Iterator |
constituentsOfType(java.lang.String type)
Return an iterator over the constituents contained by this set that are of the given type. |
static void |
debug(java.lang.String s)
Debugging output. |
boolean |
equals(java.lang.Object o)
A customized equals implementation to enable parser memoization. |
Constituent[] |
findRelatives(Constituent c,
java.lang.String type,
RelationConstraint r)
Return the set of constituents of the given type, related to the the given constituent by the given relation. |
int |
hashCode()
A customized hash code implementation to enable parser memoization. |
java.util.Iterator |
iterator()
Return an iterator over this set's contents. |
ConstituentSet |
reduce(Constituent lhs,
Constituent[] rhs)
Return a new constituent set that has been reduced by the given "production". |
int |
size()
Return the number of constituents this set contains. |
java.lang.String |
toString()
Return a string representation of this set for printing. |
Methods inherited from class java.lang.Object |
|
Field Detail |
Constituent[] _children
Constructor Detail |
public ConstituentSet(Constituent[] children)
Method Detail |
public java.util.Iterator constituentsOfType(java.lang.String type)
public static void debug(java.lang.String s)
public boolean equals(java.lang.Object o)
public Constituent[] findRelatives(Constituent c, java.lang.String type, RelationConstraint r)
public int hashCode()
public java.util.Iterator iterator()
public ConstituentSet reduce(Constituent lhs, Constituent[] rhs)
public int size()
public java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |