Class Rectangle2ai.TransformedRectanglePathIterator<E extends PathElement2ai>
- java.lang.Object
-
- org.arakhne.afc.math.geometry.d2.ai.Rectangle2ai.TransformedRectanglePathIterator<E>
-
- Type Parameters:
E
- the type of the path elements.
- All Implemented Interfaces:
Iterator<E>
,PathIterator2ai<E>
,PathIterator2D<E>
- Enclosing interface:
- Rectangle2ai<ST extends Shape2ai<?,?,IE,P,V,B>,IT extends Rectangle2ai<?,?,IE,P,V,B>,IE extends PathElement2ai,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2ai<?,?,IE,P,V,B>>
public static class Rectangle2ai.TransformedRectanglePathIterator<E extends PathElement2ai> extends Object implements PathIterator2ai<E>
Iterator on the path elements of the rectangle.- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:43
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- mathgeom
-
-
Constructor Summary
Constructors Constructor Description TransformedRectanglePathIterator(Rectangle2ai<?,?,E,?,?,?> rectangle, Transform2D transform)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GeomFactory2ai<E,?,?,?>
getGeomFactory()
Replies the factory of geometrical elements.PathWindingRule
getWindingRule()
Replies the winding rule for the path.boolean
hasNext()
boolean
isCurved()
Replies the path contains a curve.boolean
isMultiParts()
Replies the path has multiple parts, i.e. multipleMOVE_TO
are inside.boolean
isPolygon()
Replies the path is composed only by oneMOVE_TO
, a sequence ofLINE_TO
orQUAD_TO
orCURVE_TO
orARC_TO
, and a singleCLOSE
primitives.boolean
isPolyline()
Replies the path is composed only by oneMOVE_TO
, and a sequence ofLINE_TO
primitives.E
next()
PathIterator2ai<E>
restartIterations()
Replies a reset instance of this iterator.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
-
-
-
Constructor Detail
-
TransformedRectanglePathIterator
TransformedRectanglePathIterator(Rectangle2ai<?,?,E,?,?,?> rectangle, Transform2D transform)
Constructor.- Parameters:
rectangle
- is the rectangle to iterate.transform
- the transformation to apply on the rectangle.
-
-
Method Detail
-
restartIterations
public PathIterator2ai<E> restartIterations()
Description copied from interface:PathIterator2D
Replies a reset instance of this iterator.The reset instance enables to restart iterations with the replied iterator.
- Specified by:
restartIterations
in interfacePathIterator2ai<E extends PathElement2ai>
- Specified by:
restartIterations
in interfacePathIterator2D<E extends PathElement2ai>
- Returns:
- the reset iterator.
-
hasNext
@Pure public boolean hasNext()
- Specified by:
hasNext
in interfaceIterator<E extends PathElement2ai>
-
next
public E next()
- Specified by:
next
in interfaceIterator<E extends PathElement2ai>
-
getWindingRule
@Pure public PathWindingRule getWindingRule()
Description copied from interface:PathIterator2D
Replies the winding rule for the path.- Specified by:
getWindingRule
in interfacePathIterator2D<E extends PathElement2ai>
- Returns:
- the winding rule for the path.
-
isPolyline
@Pure public boolean isPolyline()
Description copied from interface:PathIterator2D
Replies the path is composed only by oneMOVE_TO
, and a sequence ofLINE_TO
primitives.- Specified by:
isPolyline
in interfacePathIterator2D<E extends PathElement2ai>
- Returns:
true
if the path does not contain curve primitives,false
otherwise.
-
isCurved
public boolean isCurved()
Description copied from interface:PathIterator2D
Replies the path contains a curve.- Specified by:
isCurved
in interfacePathIterator2D<E extends PathElement2ai>
- Returns:
true
if the path contains curve primitives,false
otherwise.
-
isMultiParts
public boolean isMultiParts()
Description copied from interface:PathIterator2D
Replies the path has multiple parts, i.e. multipleMOVE_TO
are inside. primitives.- Specified by:
isMultiParts
in interfacePathIterator2D<E extends PathElement2ai>
- Returns:
true
if the path has multiple move-to primitive,false
otherwise.
-
isPolygon
public boolean isPolygon()
Description copied from interface:PathIterator2D
Replies the path is composed only by oneMOVE_TO
, a sequence ofLINE_TO
orQUAD_TO
orCURVE_TO
orARC_TO
, and a singleCLOSE
primitives.- Specified by:
isPolygon
in interfacePathIterator2D<E extends PathElement2ai>
- Returns:
true
if the path does not contain curve primitives,false
otherwise.
-
getGeomFactory
public GeomFactory2ai<E,?,?,?> getGeomFactory()
Description copied from interface:PathIterator2D
Replies the factory of geometrical elements.- Specified by:
getGeomFactory
in interfacePathIterator2ai<E extends PathElement2ai>
- Specified by:
getGeomFactory
in interfacePathIterator2D<E extends PathElement2ai>
- Returns:
- the factory.
-
-