|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsugr.Factory
Get Instances of classes in an easy way.
Field Summary | |
private static java.lang.Class[] |
relationclasses
|
private static java.lang.String[] |
relationnames
|
Constructor Summary | |
Factory()
|
Method Summary | |
static Entity |
getEntity(Vector v,
Matrix cov,
java.lang.Class classid)
Initialize an Entity with given entities and class ID. |
static Entity |
getEntity(Vector v,
Matrix cov,
java.lang.String classname)
Initialize an Entity with given entities and class name. |
static java.lang.Object |
getInstance(java.lang.Object e1,
java.lang.Object e2,
java.lang.String classname)
Initialize an object with 2 given parameters and class name. |
static java.lang.Object |
getInstance(java.lang.Object e1,
java.lang.Object e2,
java.lang.String classname_param1,
java.lang.String classname_param2,
java.lang.String classname)
Initialize an object with 2 given parameters and their tpyes and class name. |
static Relation |
getRelation(Entity e1,
Entity e2,
java.lang.Class relationID)
Initialize a relation class with given entities and class ID. |
static Relation |
getRelation(Entity e1,
Entity e2,
java.lang.String relationclassname)
Initialize a relation class with given entities and class name. |
static Relation |
getRelationByName(Entity e1,
Entity e2,
java.lang.String relation)
Initialize a relation class with given entities and class name. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.String[] relationnames
private static final java.lang.Class[] relationclasses
Constructor Detail |
public Factory()
Method Detail |
public static Entity getEntity(Vector v, Matrix cov, java.lang.String classname) throws java.lang.IllegalArgumentException, java.lang.RuntimeException
classname
- one of an Entity which exists in sugr.
java.lang.IllegalArgumentException
- if construction not possible
java.lang.RuntimeException
- if an Exceptioin while creating the objectpublic static Entity getEntity(Vector v, Matrix cov, java.lang.Class classid) throws java.lang.IllegalArgumentException, java.lang.RuntimeException
classid
- one of POINT_2D,LINE_2D,POINT_3D,LINE_3D PLANE_3D
java.lang.IllegalArgumentException
- if construction not possible
java.lang.RuntimeException
- if an Exceptioin while creating the objectpublic static Relation getRelationByName(Entity e1, Entity e2, java.lang.String relation) throws java.lang.IllegalArgumentException, java.lang.RuntimeException
relation
- name of the relation: "Incidence", "Identity",
"Parallelity", "Orthogonality", "Distance"
java.lang.IllegalArgumentException
- if Relation not possible
java.lang.RuntimeException
- if an Exceptioin while creating the Relation occurspublic static Relation getRelation(Entity e1, Entity e2, java.lang.Class relationID)
relationID
- name of the relation class: Orthogonal, Equal,
Incident, Parallel
java.lang.IllegalArgumentException
- if Relation not possible
java.lang.RuntimeException
- if an Exceptioin while creating the Relation occurspublic static Relation getRelation(Entity e1, Entity e2, java.lang.String relationclassname) throws java.lang.ClassNotFoundException
relationclassname
- name of the relation class: Orthogonal, Equal,
Incident, Parallel, Distance
java.lang.IllegalArgumentException
- if Relation not possible
java.lang.RuntimeException
- if an Exceptioin while creating the Relation occurs
java.lang.ClassNotFoundException
public static java.lang.Object getInstance(java.lang.Object e1, java.lang.Object e2, java.lang.String classname) throws java.lang.IllegalArgumentException, java.lang.RuntimeException
classname
- name of the class. Should be a class available in sugr.
java.lang.IllegalArgumentException
- if Construction is not possible
java.lang.RuntimeException
- if an Exception while creating the object occurspublic static java.lang.Object getInstance(java.lang.Object e1, java.lang.Object e2, java.lang.String classname_param1, java.lang.String classname_param2, java.lang.String classname) throws java.lang.IllegalArgumentException, java.lang.RuntimeException
classname
- name of the class. Should be a class available in sugr.
java.lang.IllegalArgumentException
- if Construction is not possible
java.lang.RuntimeException
- if an Exception while creating the object occurs
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |