|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--edu.mit.sketch.ddg.Primitive
An abstract geometric primitive that is part of an object description
Primitive.java Created: Sat Nov 20 21:36:00 2001
| Field Summary | |
static int |
ARC
|
static int |
LINE
|
static int |
OVAL
|
static int |
POINT
|
static int |
UNKNOWN
|
| Constructor Summary | |
Primitive(int type,
String name)
Constructs the primitive of the type and name |
|
| Method Summary | |
static Primitive |
convertFrom(GeometricObject o,
int index)
Constructs a primitive from a give object with index in the name. |
boolean |
equals(Object p)
The two primitives are the same if their name and type are the same. |
int |
hashCode()
The hashcode of a primitive is a hash code of it's name. |
String |
name()
Name of the primitive (like "l2" in "line l2") |
void |
print()
Print the description of the primitive (like "line l2") on a separate line |
String |
toString()
String description of the primitive (like "line l2") - includes both type and name |
int |
type()
Type of the primitive (like "line" in "line l2") |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int UNKNOWN
public static final int POINT
public static final int LINE
public static final int OVAL
public static final int ARC
| Constructor Detail |
public Primitive(int type,
String name)
| Method Detail |
public static Primitive convertFrom(GeometricObject o,
int index)
public String toString()
toString in class Objectpublic void print()
public boolean equals(Object p)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String name()
public int type()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||