|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<Shape>
org.qtitools.qti.node.expression.operator.Shape
public enum Shape
Enumeration for inside expression.
Inside| Enum Constant Summary | |
|---|---|
CIRCLE
A circular region. |
|
DEFAULT
The default shape refers to the entire area of the associated image. |
|
ELLIPSE
This value is deprecated, but is included for compatibility with version of 1 of the QTI specification. |
|
POLY
An arbitrary polygonal region. |
|
RECT
A rectangular region. |
|
| Field Summary | |
|---|---|
static java.lang.String |
CLASS_TAG
Name of this class in xml schema. |
| Method Summary | |
|---|---|
abstract boolean |
isInside(int[] coords,
PointValue point)
Returns true if given PointValue is inside this Shape; false otherwise. |
static Shape |
parseShape(java.lang.String shape)
Parses string representation of Shape. |
java.lang.String |
toString()
|
abstract ValidationResult |
validateCoords(Attribute attribute,
int[] coords)
Validates coords attribute. |
protected ValidationResult |
validateCoordsLength(Attribute attribute,
int[] coords,
int expectedLength)
Validates length of coords attribute (number of coordinates). |
protected ValidationResult |
validatePositiveCoords(Attribute attribute,
int[] coords)
Validates if all coordinates are greater or equal than zero. |
static Shape |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static Shape[] |
values()
Returns an array containing the constants of this enum type, in the order they're declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final Shape DEFAULT
public static final Shape RECT
public static final Shape CIRCLE
public static final Shape POLY
public static final Shape ELLIPSE
| Field Detail |
|---|
public static final java.lang.String CLASS_TAG
| Method Detail |
|---|
public static final Shape[] values()
for(Shape c : Shape.values())
System.out.println(c);
public static Shape valueOf(java.lang.String name)
name - the name of the enum constant to be returned.
java.lang.IllegalArgumentException - if this enum type has no constant
with the specified name
public abstract ValidationResult validateCoords(Attribute attribute,
int[] coords)
attribute - attribute to be validatedcoords - attribute's value to be validated
protected ValidationResult validateCoordsLength(Attribute attribute,
int[] coords,
int expectedLength)
attribute - attribute to be validatedcoords - attribute's value to be validatedexpectedLength - expected length of coords attribute (number of coordinates)
protected ValidationResult validatePositiveCoords(Attribute attribute,
int[] coords)
attribute - attribute to be validatedcoords - attribute's value to be validated
public abstract boolean isInside(int[] coords,
PointValue point)
PointValue is inside this Shape; false otherwise.
coords - coordinates of this shapepoint - given PointValue
PointValue is inside this Shape; false otherwisepublic java.lang.String toString()
toString in class java.lang.Enum<Shape>public static Shape parseShape(java.lang.String shape)
Shape.
shape - string representation of Shape
Shape
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||