Package com.google.common.geometry
Enum S2Error.Code
- java.lang.Object
-
- java.lang.Enum<S2Error.Code>
-
- com.google.common.geometry.S2Error.Code
-
- All Implemented Interfaces:
Serializable,Comparable<S2Error.Code>
- Enclosing class:
- S2Error
public static enum S2Error.Code extends Enum<S2Error.Code>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ANTIPODAL_VERTICESThere are two antipodal vertices.DATA_LOSSData loss or corruption.DUPLICATE_VERTICESThere are two identical vertices.FAILED_PRECONDITIONObject is not in the required state.INTERNALAn internal invariant has failed.INVALID_ARGUMENTInvalid argument (other than a range error).LOOP_NOT_ENOUGH_VERTICESLoop with fewer than 3 vertices.LOOP_SELF_INTERSECTIONLoop has a self-intersection.NO_ERRORNo problems detected.NOT_UNIT_LENGTHVertex is not unit length.OUT_OF_RANGEArgument is out of range.POLYGON_EMPTY_LOOPPolygon has an empty loop.POLYGON_EXCESS_FULL_LOOPNon-full polygon has a full loop.POLYGON_INVALID_LOOP_DEPTHLoop depths don't correspond to any valid nesting hierarchy.POLYGON_INVALID_LOOP_NESTINGActual polygon nesting does not correspond to the nesting given in the loop depths.POLYGON_LOOPS_CROSSTwo polygon loops cross.POLYGON_LOOPS_SHARE_EDGETwo polygon loops share an edge.RESOURCE_EXHAUSTEDA resource has been exhausted.UNIMPLEMENTEDOperation is not implemented.UNKNOWNUnknown error.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcode()Returns the numeric value of this error code.static S2Error.CodevalueOf(String name)Returns the enum constant of this type with the specified name.static S2Error.Code[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NO_ERROR
public static final S2Error.Code NO_ERROR
No problems detected.
-
UNKNOWN
public static final S2Error.Code UNKNOWN
Unknown error.
-
UNIMPLEMENTED
public static final S2Error.Code UNIMPLEMENTED
Operation is not implemented.
-
OUT_OF_RANGE
public static final S2Error.Code OUT_OF_RANGE
Argument is out of range.
-
INVALID_ARGUMENT
public static final S2Error.Code INVALID_ARGUMENT
Invalid argument (other than a range error).
-
FAILED_PRECONDITION
public static final S2Error.Code FAILED_PRECONDITION
Object is not in the required state.
-
INTERNAL
public static final S2Error.Code INTERNAL
An internal invariant has failed.
-
DATA_LOSS
public static final S2Error.Code DATA_LOSS
Data loss or corruption.
-
RESOURCE_EXHAUSTED
public static final S2Error.Code RESOURCE_EXHAUSTED
A resource has been exhausted.
-
NOT_UNIT_LENGTH
public static final S2Error.Code NOT_UNIT_LENGTH
Vertex is not unit length.
-
DUPLICATE_VERTICES
public static final S2Error.Code DUPLICATE_VERTICES
There are two identical vertices.
-
ANTIPODAL_VERTICES
public static final S2Error.Code ANTIPODAL_VERTICES
There are two antipodal vertices.
-
LOOP_NOT_ENOUGH_VERTICES
public static final S2Error.Code LOOP_NOT_ENOUGH_VERTICES
Loop with fewer than 3 vertices.
-
LOOP_SELF_INTERSECTION
public static final S2Error.Code LOOP_SELF_INTERSECTION
Loop has a self-intersection.
-
POLYGON_LOOPS_SHARE_EDGE
public static final S2Error.Code POLYGON_LOOPS_SHARE_EDGE
Two polygon loops share an edge.
-
POLYGON_LOOPS_CROSS
public static final S2Error.Code POLYGON_LOOPS_CROSS
Two polygon loops cross.
-
POLYGON_EMPTY_LOOP
public static final S2Error.Code POLYGON_EMPTY_LOOP
Polygon has an empty loop.
-
POLYGON_EXCESS_FULL_LOOP
public static final S2Error.Code POLYGON_EXCESS_FULL_LOOP
Non-full polygon has a full loop.
-
POLYGON_INVALID_LOOP_DEPTH
public static final S2Error.Code POLYGON_INVALID_LOOP_DEPTH
Loop depths don't correspond to any valid nesting hierarchy.
-
POLYGON_INVALID_LOOP_NESTING
public static final S2Error.Code POLYGON_INVALID_LOOP_NESTING
Actual polygon nesting does not correspond to the nesting given in the loop depths.
-
-
Method Detail
-
values
public static S2Error.Code[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (S2Error.Code c : S2Error.Code.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static S2Error.Code valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
code
public int code()
Returns the numeric value of this error code.
-
-