|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gishur.core.geom.Intersection
Basic intersection class. By constructing this class with two objects the intersection of these objects will be calculated, if one of them implements intersectable. The constucted object represents the intersection set. This could be empty, a single object or a list of objects. A set of methods allow access to all intersection objects.
No support for arrays or lists or otherwise intersection of more than two objects is supported at this level.
Constructor Summary | |
Intersection()
Constructs an empty Intersection. |
|
Intersection(int mode,
java.lang.Object o1,
java.lang.Object o2)
Constructs an Intersection object through calculating the intersection of the two given objects. |
|
Intersection(java.lang.Object o1,
java.lang.Object o2)
Constructs an Intersection object through calculating the intersection of the two given objects. |
Method Summary | |
boolean |
empty()
Tests, if the intersection set is empty. |
java.lang.Object[] |
getObjectArray()
Returns all intersection objects stored in an array. |
SimpleList |
getObjectList()
Returns all intersection objects stored in a gishur.core.SimpleList |
int |
length()
Returns the quantity of the intersection objects. |
java.lang.Object |
object()
Returns the (first) intersection object. |
java.lang.Object |
object(int i)
Returns the i-th object in the intersection set. if no such objects exits, null will be returned. |
boolean |
single()
Tests, if the intersection consists of one single object. |
java.lang.String |
toString()
Returns a string representation of the object. |
java.lang.Class |
type()
Returns the Class object representing the class of the (first)
intersection object. |
java.lang.Class |
type(int i)
Returns the Class -object representing the class of the
i-th intersection object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Intersection()
public Intersection(int mode, java.lang.Object o1, java.lang.Object o2)
mode
- used intersection modeo1,o2
- intersecting ObjectsIntersectionException
- public Intersection(java.lang.Object o1, java.lang.Object o2)
o1,o2
- intersecting ObjectsIntersectionException
- Method Detail |
public int length()
public boolean empty()
length()
==0.public boolean single()
length()
==1.public java.lang.Object object(int i)
i
- index of the requested intersection objectpublic java.lang.Object object()
object(int)
public java.lang.Class type(int i)
Class
-object representing the class of the
i-th intersection object.i
- index of the requested intersection objectpublic java.lang.Class type()
Class
object representing the class of the (first)
intersection object.public java.lang.Object[] getObjectArray()
public SimpleList getObjectList()
gishur.core.SimpleList
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |