org.shapelogic.polygon
Class MultiLinePolygon

java.lang.Object
  extended by org.shapelogic.polygon.BaseAnnotatedShape
      extended by org.shapelogic.polygon.Polygon
          extended by org.shapelogic.polygon.MultiLinePolygon
All Implemented Interfaces:
java.lang.Cloneable, Calc0<Polygon>, CalcInvoke<Polygon>, CalcValue<Polygon>, LazyCalc<Polygon>, AnnotatedShape, GeometricShape2D, IPolygon2D, PointReplacable<Polygon>

public class MultiLinePolygon
extends Polygon

Not sure if I really need this or if I am going to move it into Polygon

Author:
Sami Badawi

Field Summary
protected  java.util.Set<CLine> _independentLines
           
protected  java.util.List<MultiLine> _multiLines
           
 
Fields inherited from class org.shapelogic.polygon.Polygon
_annotatedShape, _aspectRatio, _bBox, _closed, _currentMultiLine, _dirty, _endPointCount, _endPointsClusters, _lines, _perimeter, _points, _pointsCountMap, _pointsToLineMap, _polygonImprovers, _version
 
Constructor Summary
MultiLinePolygon()
           
MultiLinePolygon(AnnotatedShapeImplementation annotatedShape)
           
 
Method Summary
 CLine addIndependentLine(IPoint2D point1, IPoint2D point2)
          To have the same interface as MultiLinePolygon
 void addMultiLine(MultiLine multiLine)
           
 void endMultiLine()
          Add all the lines segments in the multi line to _lines
 java.util.Set<CLine> getIndependentLines()
          To have the same interface as MultiLinePolygon
 java.util.List<MultiLine> getMultiLines()
          To have the same interface as MultiLinePolygon returns null since this and the independent lines are supposed to be all the lines
 java.lang.String internalInfo(java.lang.StringBuffer sb)
           
 Polygon replacePointsInMap(java.util.Map<IPoint2D,IPoint2D> pointReplacementMap, AnnotatedShapeImplementation annotatedShape)
          This is a little problematic
 
Methods inherited from class org.shapelogic.polygon.Polygon
addAfterEnd, addBeforeStart, addIndependentLine, addLine, addLine, cleanUp, clone, containsLine, containsPoint, filter, filter, findPointCount, getAspectRatio, getBBox, getCenter, getCurrentMultiLine, getDiameter, getEndPointCount, getEndPointsClusters, getEndPointsMultiClusters, getHoleCount, getHorizontalLines, getLines, getLinesForPoint, getPerimeter, getPoints, getPointsCountMap, getPointsToLineMap, getValue, getVersion, getVerticalLines, improve, internalFactory, invoke, isClosed, isDirty, printAnnotation, setPerimeter, setPolygonImprovers, setup, setVersion, startMultiLine, toString
 
Methods inherited from class org.shapelogic.polygon.BaseAnnotatedShape
getAnnotatedShape, getAnnotationForShapes, getMap, getShapesForAnnotation, putAllAnnotation, putAnnotation
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_multiLines

protected java.util.List<MultiLine> _multiLines

_independentLines

protected java.util.Set<CLine> _independentLines
Constructor Detail

MultiLinePolygon

public MultiLinePolygon()

MultiLinePolygon

public MultiLinePolygon(AnnotatedShapeImplementation annotatedShape)
Method Detail

addMultiLine

public void addMultiLine(MultiLine multiLine)
Overrides:
addMultiLine in class Polygon

endMultiLine

public void endMultiLine()
Description copied from class: Polygon
Add all the lines segments in the multi line to _lines

Overrides:
endMultiLine in class Polygon

addIndependentLine

public CLine addIndependentLine(IPoint2D point1,
                                IPoint2D point2)
Description copied from class: Polygon
To have the same interface as MultiLinePolygon

Overrides:
addIndependentLine in class Polygon

getIndependentLines

public java.util.Set<CLine> getIndependentLines()
Description copied from class: Polygon
To have the same interface as MultiLinePolygon

Overrides:
getIndependentLines in class Polygon

getMultiLines

public java.util.List<MultiLine> getMultiLines()
Description copied from class: Polygon
To have the same interface as MultiLinePolygon returns null since this and the independent lines are supposed to be all the lines

Overrides:
getMultiLines in class Polygon

replacePointsInMap

public Polygon replacePointsInMap(java.util.Map<IPoint2D,IPoint2D> pointReplacementMap,
                                  AnnotatedShapeImplementation annotatedShape)
This is a little problematic

Specified by:
replacePointsInMap in interface PointReplacable<Polygon>
Overrides:
replacePointsInMap in class Polygon

internalInfo

public java.lang.String internalInfo(java.lang.StringBuffer sb)
Overrides:
internalInfo in class Polygon


Copyright © 2009. All Rights Reserved.