Class MultiShape2afp.AbstractMultiShapePathIterator<IE extends PathElement2afp>
- java.lang.Object
-
- org.arakhne.afc.math.geometry.d2.afp.MultiShape2afp.AbstractMultiShapePathIterator<IE>
-
- Type Parameters:
IE- the type of the path elements.
- All Implemented Interfaces:
Cloneable,Iterator<IE>,PathIterator2afp<IE>,PathIterator2D<IE>
- Direct Known Subclasses:
MultiShape2afp.MultiShapePathIterator,MultiShape2afp.TransformedMultiShapePathIterator
- Enclosing interface:
- MultiShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends MultiShape2afp<?,?,CT,IE,P,V,B>,CT extends Shape2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>
public abstract static class MultiShape2afp.AbstractMultiShapePathIterator<IE extends PathElement2afp> extends Object implements PathIterator2afp<IE>
Abstract iterator on the path elements of the multishape.- 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 AbstractMultiShapePathIterator(List<? extends Shape2afp<?,?,IE,?,?,?>> list, GeomFactory2afp<IE,?,?,?> factory)Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voiddelayedInit(List<? extends Shape2afp<?,?,IE,?,?,?>> list)Initialization.GeomFactory2afp<IE,?,?,?>getGeomFactory()Replies the factory of geometrical elements.protected abstract PathIterator2afp<IE>getPathIteratorFrom(Shape2afp<?,?,IE,?,?,?> shape)Replies the path iterator of the shape.PathWindingRulegetWindingRule()Replies the winding rule for the path.booleanhasNext()booleanisCurved()Replies the path contains a curve.booleanisMultiParts()Replies the path has multiple parts, i.e. multipleMOVE_TOare inside.booleanisPolygon()Replies the path is composed only by oneMOVE_TO, a sequence ofLINE_TOorQUAD_TOorCURVE_TOorARC_TO, and a singleCLOSEprimitives.booleanisPolyline()Replies the path is composed only by oneMOVE_TO, and a sequence ofLINE_TOprimitives.IEnext()-
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
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.afp.PathIterator2afp
restartIterations
-
-
-
-
Field Detail
-
list
protected final List<? extends Shape2afp<?,?,IE extends PathElement2afp,?,?,?>> list
Iterated list.
-
-
Constructor Detail
-
AbstractMultiShapePathIterator
public AbstractMultiShapePathIterator(List<? extends Shape2afp<?,?,IE,?,?,?>> list, GeomFactory2afp<IE,?,?,?> factory)
Constructor.- Parameters:
list- the list of the shapes to iterate on.factory- the factory of path elements.
-
-
Method Detail
-
delayedInit
protected void delayedInit(List<? extends Shape2afp<?,?,IE,?,?,?>> list)
Initialization.- Parameters:
list- the list to iterate on.
-
getPathIteratorFrom
protected abstract PathIterator2afp<IE> getPathIteratorFrom(Shape2afp<?,?,IE,?,?,?> shape)
Replies the path iterator of the shape.- Parameters:
shape- the shape.- Returns:
- the path iterator.
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfaceIterator<IE extends PathElement2afp>
-
next
public IE next()
- Specified by:
nextin interfaceIterator<IE extends PathElement2afp>
-
getWindingRule
public PathWindingRule getWindingRule()
Description copied from interface:PathIterator2DReplies the winding rule for the path.- Specified by:
getWindingRulein interfacePathIterator2D<IE extends PathElement2afp>- Returns:
- the winding rule for the path.
-
isPolyline
public boolean isPolyline()
Description copied from interface:PathIterator2DReplies the path is composed only by oneMOVE_TO, and a sequence ofLINE_TOprimitives.- Specified by:
isPolylinein interfacePathIterator2D<IE extends PathElement2afp>- Returns:
trueif the path does not contain curve primitives,falseotherwise.
-
isCurved
public boolean isCurved()
Description copied from interface:PathIterator2DReplies the path contains a curve.- Specified by:
isCurvedin interfacePathIterator2D<IE extends PathElement2afp>- Returns:
trueif the path contains curve primitives,falseotherwise.
-
isMultiParts
public boolean isMultiParts()
Description copied from interface:PathIterator2DReplies the path has multiple parts, i.e. multipleMOVE_TOare inside. primitives.- Specified by:
isMultiPartsin interfacePathIterator2D<IE extends PathElement2afp>- Returns:
trueif the path has multiple move-to primitive,falseotherwise.
-
isPolygon
public boolean isPolygon()
Description copied from interface:PathIterator2DReplies the path is composed only by oneMOVE_TO, a sequence ofLINE_TOorQUAD_TOorCURVE_TOorARC_TO, and a singleCLOSEprimitives.- Specified by:
isPolygonin interfacePathIterator2D<IE extends PathElement2afp>- Returns:
trueif the path does not contain curve primitives,falseotherwise.
-
getGeomFactory
public GeomFactory2afp<IE,?,?,?> getGeomFactory()
Description copied from interface:PathIterator2DReplies the factory of geometrical elements.- Specified by:
getGeomFactoryin interfacePathIterator2afp<IE extends PathElement2afp>- Specified by:
getGeomFactoryin interfacePathIterator2D<IE extends PathElement2afp>- Returns:
- the factory.
-
-