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:
java.io.Serializable
,java.lang.Comparable<S2Error.Code>
- Enclosing class:
- S2Error
public static enum S2Error.Code extends java.lang.Enum<S2Error.Code>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ANTIPODAL_VERTICES
There are two antipodal vertices.DATA_LOSS
Data loss or corruption.DUPLICATE_VERTICES
There are two identical vertices.FAILED_PRECONDITION
Object is not in the required state.INTERNAL
An internal invariant has failed.INVALID_ARGUMENT
Invalid argument (other than a range error).LOOP_NOT_ENOUGH_VERTICES
Loop with fewer than 3 vertices.LOOP_SELF_INTERSECTION
Loop has a self-intersection.NO_ERROR
No problems detected.NOT_UNIT_LENGTH
Vertex is not unit length.OUT_OF_RANGE
Argument is out of range.POLYGON_EMPTY_LOOP
Polygon has an empty loop.POLYGON_EXCESS_FULL_LOOP
Non-full polygon has a full loop.POLYGON_INVALID_LOOP_DEPTH
Loop depths don't correspond to any valid nesting hierarchy.POLYGON_INVALID_LOOP_NESTING
Actual polygon nesting does not correspond to the nesting given in the loop depths.POLYGON_LOOPS_CROSS
Two polygon loops cross.POLYGON_LOOPS_SHARE_EDGE
Two polygon loops share an edge.RESOURCE_EXHAUSTED
A resource has been exhausted.UNIMPLEMENTED
Operation is not implemented.UNKNOWN
Unknown error.
-
Field Summary
Fields Modifier and Type Field Description private int
code
-
Constructor Summary
Constructors Modifier Constructor Description private
Code(int code)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
code()
Returns the numeric value of this error code.static S2Error.Code
valueOf(java.lang.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(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
code
public int code()
Returns the numeric value of this error code.
-
-