Class EmptyShape
java.lang.Object
org.apache.sis.internal.referencing.j2d.AbstractShape
org.apache.sis.internal.feature.j2d.EmptyShape
- All Implemented Interfaces:
PathIterator
,Shape
,Serializable
An empty shape.
- Since:
- 1.1
- Version:
- 1.2
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EmptyShape
The unique empty shape instance.private static final long
For cross-version compatibility.Fields inherited from interface java.awt.geom.PathIterator
SEG_CLOSE, SEG_CUBICTO, SEG_LINETO, SEG_MOVETO, SEG_QUADTO, WIND_EVEN_ODD, WIND_NON_ZERO
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
contains
(double x, double y) boolean
contains
(double x, double y, double w, double h) boolean
boolean
int
currentSegment
(double[] coords) int
currentSegment
(float[] coords) Returns an empty bounds.getPathIterator
(AffineTransform at, double flatness) int
boolean
intersects
(double x, double y, double w, double h) boolean
boolean
isDone()
void
next()
private Object
Invoked at deserialization time for obtaining the unique instance of this shape.Methods inherited from class org.apache.sis.internal.referencing.j2d.AbstractShape
isFloat, isFloat
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility.- See Also:
-
INSTANCE
The unique empty shape instance.
-
-
Constructor Details
-
EmptyShape
private EmptyShape()ForINSTANCE
construction only.
-
-
Method Details
-
getBounds
Returns an empty bounds. -
getBounds2D
- Specified by:
getBounds2D
in interfaceShape
-
getWindingRule
public int getWindingRule()- Specified by:
getWindingRule
in interfacePathIterator
-
contains
-
contains
-
intersects
- Specified by:
intersects
in interfaceShape
-
contains
public boolean contains(double x, double y) -
contains
public boolean contains(double x, double y, double w, double h) -
intersects
public boolean intersects(double x, double y, double w, double h) - Specified by:
intersects
in interfaceShape
-
getPathIterator
- Specified by:
getPathIterator
in interfaceShape
-
getPathIterator
- Specified by:
getPathIterator
in interfaceShape
-
isDone
public boolean isDone()- Specified by:
isDone
in interfacePathIterator
-
next
public void next()- Specified by:
next
in interfacePathIterator
-
currentSegment
public int currentSegment(float[] coords) - Specified by:
currentSegment
in interfacePathIterator
-
currentSegment
public int currentSegment(double[] coords) - Specified by:
currentSegment
in interfacePathIterator
-
readResolve
Invoked at deserialization time for obtaining the unique instance of this shape.- Returns:
- the unique
Shape
instance for this class. - Throws:
ObjectStreamException
- if the object state is invalid.
-