Package com.google.common.geometry
Enum S2Error.Code
- All Implemented Interfaces:
Serializable
,Comparable<S2Error.Code>
,java.lang.constant.Constable
- Enclosing class:
S2Error
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThere are two antipodal vertices.Data loss or corruption.There are two identical vertices.Object is not in the required state.An internal invariant has failed.Invalid argument (other than a range error).Loop with fewer than 3 vertices.Loop has a self-intersection.No problems detected.Vertex is not unit length.Argument is out of range.Polygon has an empty loop.Non-full polygon has a full loop.Loop depths don't correspond to any valid nesting hierarchy.Actual polygon nesting does not correspond to the nesting given in the loop depths.Two polygon loops cross.Two polygon loops share an edge.A resource has been exhausted.Operation is not implemented.Unknown error. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
code()
Returns the numeric value of this error code.static S2Error.Code
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 Details
-
NO_ERROR
No problems detected. -
UNKNOWN
Unknown error. -
UNIMPLEMENTED
Operation is not implemented. -
OUT_OF_RANGE
Argument is out of range. -
INVALID_ARGUMENT
Invalid argument (other than a range error). -
FAILED_PRECONDITION
Object is not in the required state. -
INTERNAL
An internal invariant has failed. -
DATA_LOSS
Data loss or corruption. -
RESOURCE_EXHAUSTED
A resource has been exhausted. -
NOT_UNIT_LENGTH
Vertex is not unit length. -
DUPLICATE_VERTICES
There are two identical vertices. -
ANTIPODAL_VERTICES
There are two antipodal vertices. -
LOOP_NOT_ENOUGH_VERTICES
Loop with fewer than 3 vertices. -
LOOP_SELF_INTERSECTION
Loop has a self-intersection. -
POLYGON_LOOPS_SHARE_EDGE
Two polygon loops share an edge. -
POLYGON_LOOPS_CROSS
Two polygon loops cross. -
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.
-
-
Field Details
-
code
private int code
-
-
Constructor Details
-
Code
private Code(int code)
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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.
-