Skip to content

Commit 0734c51

Browse files
author
dlegland
committed
remove Boundary2D.getBoundaryCurves()
1 parent a32fc87 commit 0734c51

13 files changed

+7
-100
lines changed

changes.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
Changes in javaGeom library
22

3+
* lots of changes in method names
4+
* fixed AffineTransform2D.isMotion(), and cleanup code
5+
6+
37
javaGeom-0.10.2 (2012.03.11, rev. 315)
48
=====
59

src/math/geom2d/circulinear/BoundaryPolyCirculinearCurve2D.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -189,16 +189,6 @@ public void fill(Graphics2D g2) {
189189
g2.fill(this.getGeneralPath());
190190
}
191191

192-
/* (non-Javadoc)
193-
* @see math.geom2d.domain.Boundary2D#getBoundaryCurves()
194-
*/
195-
public Collection<BoundaryPolyCirculinearCurve2D<T>> boundaryCurves() {
196-
ArrayList<BoundaryPolyCirculinearCurve2D<T>> list =
197-
new ArrayList<BoundaryPolyCirculinearCurve2D<T>>(1);
198-
list.add(this);
199-
return list;
200-
}
201-
202192
/* (non-Javadoc)
203193
* @see math.geom2d.domain.Boundary2D#getDomain()
204194
*/

src/math/geom2d/circulinear/GenericCirculinearRing2D.java

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -71,31 +71,13 @@ public GenericCirculinearRing2D(CirculinearElement2D... curves) {
7171
this.closed = true;
7272
}
7373

74-
/**
75-
* @deprecated, as a ring is closed by definition (0.8.1)
76-
*/
77-
@Deprecated
78-
public GenericCirculinearRing2D(CirculinearElement2D[] curves,
79-
boolean closed) {
80-
super(curves, closed);
81-
}
82-
8374
public GenericCirculinearRing2D(
8475
Collection<? extends CirculinearElement2D> curves) {
8576
super(curves);
8677
this.closed = true;
8778
}
8879

89-
/**
90-
* @deprecated, as a ring is closed by definition (0.8.1)
91-
*/
92-
@Deprecated
93-
public GenericCirculinearRing2D(
94-
Collection<? extends CirculinearElement2D> curves,
95-
boolean closed) {
96-
super(curves, closed);
97-
}
98-
80+
9981
// ===================================================================
10082
// methods specific to GenericCirculinearRing2D
10183

@@ -130,13 +112,6 @@ public void fill(Graphics2D g2) {
130112
g2.fill(this.getGeneralPath());
131113
}
132114

133-
/* (non-Javadoc)
134-
* @see math.geom2d.domain.Boundary2D#getBoundaryCurves()
135-
*/
136-
public Collection<? extends CirculinearContour2D> boundaryCurves() {
137-
return wrapCurve(this);
138-
}
139-
140115
/* (non-Javadoc)
141116
* @see math.geom2d.domain.Boundary2D#getDomain()
142117
*/

src/math/geom2d/conic/Ellipse2D.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -660,10 +660,6 @@ public double eccentricity() {
660660
// ===================================================================
661661
// methods implementing the Boundary2D interface
662662

663-
public Collection<? extends Ellipse2D> boundaryCurves() {
664-
return wrapCurve(this);
665-
}
666-
667663
public Domain2D domain() {
668664
return new GenericDomain2D(this);
669665
}

src/math/geom2d/conic/HyperbolaBranch2D.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
import math.geom2d.*;
1010
import math.geom2d.curve.*;
11-
import math.geom2d.domain.Contour2D;
1211
import math.geom2d.domain.Domain2D;
1312
import math.geom2d.domain.GenericDomain2D;
1413
import math.geom2d.domain.SmoothContour2D;
@@ -116,16 +115,6 @@ public Vector2D tangent(double t) {
116115
// ===================================================================
117116
// methods inherited from Boundary2D interface
118117

119-
/**
120-
* Returns an instance of ArrayList<Contour2D> containing only
121-
* <code>this</code>.
122-
*/
123-
public Collection<Contour2D> boundaryCurves() {
124-
ArrayList<Contour2D> list = new ArrayList<Contour2D>();
125-
list.add(this);
126-
return list;
127-
}
128-
129118
public Domain2D domain() {
130119
return new GenericDomain2D(this);
131120
}

src/math/geom2d/conic/Parabola2D.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -237,12 +237,6 @@ public double eccentricity() {
237237
// ==========================================================
238238
// methods implementing the Boundary2D interface
239239

240-
public Collection<Contour2D> boundaryCurves() {
241-
ArrayList<Contour2D> list = new ArrayList<Contour2D>(1);
242-
list.add(this);
243-
return list;
244-
}
245-
246240
public Domain2D domain() {
247241
return new GenericDomain2D(this);
248242
}

src/math/geom2d/domain/Boundary2D.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,6 @@ public interface Boundary2D extends OrientedCurve2D {
5050
*/
5151
public boolean isInside(Point2D pt);
5252

53-
/**
54-
* Returns the different continuous curves composing the boundary
55-
* @deprecated replaced by getContinuousCurves (0.9.1)
56-
*/
57-
@Deprecated
58-
public Collection<? extends Contour2D> boundaryCurves();
59-
6053
/**
6154
* Overloads the declaration of continuousCurves to return a collection
6255
* of contours (instances of Contour2D).

src/math/geom2d/domain/BoundaryPolyCurve2D.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -105,16 +105,6 @@ public boolean isClosed() {
105105
// ===================================================================
106106
// Methods implementing Boundary2D interface
107107

108-
/**
109-
* Returns a ArrayList<ContinuousBoundary2D> containing only
110-
* <code>this</code>.
111-
* @deprecated use getContinuousCurves instead (0.9.1)
112-
*/
113-
@Deprecated
114-
public Collection<? extends Contour2D> boundaryCurves() {
115-
return wrapCurve(this);
116-
}
117-
118108
public Collection<BoundaryPolyCurve2D<T>> continuousCurves() {
119109
return wrapCurve(this);
120110
}

src/math/geom2d/domain/ContourArray2D.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,6 @@ public ContourArray2D(T curve) {
9696
// ===================================================================
9797
// Methods implementing Boundary2D interface
9898

99-
/**
100-
* @deprecated replaced by getContinuousCurves
101-
*/
102-
@Deprecated
103-
public Collection<? extends Contour2D> boundaryCurves() {
104-
return this.continuousCurves();
105-
}
106-
10799
public Collection<? extends T> continuousCurves() {
108100
return Collections.unmodifiableCollection(this.curves);
109101
}

src/math/geom2d/domain/OrientedCurve2D.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@
3535
/**
3636
* An OrientedCurve2D defines an 'inside' and an 'outside'. It is typically a
3737
* part of the boundary of a domain. Several OrientedCurve2D form a
38-
* ContinuousBoundary2D, and one or several ContinousBoundary2D form a
39-
* Boundary2D.
38+
* Contour2D, and one or several Contour2D form a Boundary2D.
4039
*
4140
* @author dlegland
4241
*/

src/math/geom2d/line/StraightLine2D.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
import math.geom2d.circulinear.CircleLine2D;
4444
import math.geom2d.circulinear.GenericCirculinearDomain2D;
4545
import math.geom2d.conic.Circle2D;
46-
import math.geom2d.domain.Contour2D;
4746
import math.geom2d.domain.Domain2D;
4847
import math.geom2d.domain.SmoothContour2D;
4948
import math.geom2d.polygon.Polyline2D;
@@ -334,12 +333,6 @@ public CircleLine2D transform(CircleInversion2D inv) {
334333
// ===================================================================
335334
// methods specific to Boundary2D interface
336335

337-
public Collection<Contour2D> boundaryCurves() {
338-
ArrayList<Contour2D> list = new ArrayList<Contour2D>(1);
339-
list.add(this);
340-
return list;
341-
}
342-
343336
public Domain2D domain() {
344337
return new GenericCirculinearDomain2D(this);
345338
}

src/math/geom2d/polygon/LinearRing2D.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
import math.geom2d.circulinear.CirculinearRing2D;
3838
import math.geom2d.circulinear.GenericCirculinearRing2D;
3939
import math.geom2d.circulinear.buffer.BufferCalculator;
40-
import math.geom2d.domain.Contour2D;
4140
import math.geom2d.domain.Domain2D;
4241
import math.geom2d.domain.GenericDomain2D;
4342
import math.geom2d.line.LineSegment2D;
@@ -208,13 +207,6 @@ public CirculinearRing2D transform(CircleInversion2D inv) {
208207
// ===================================================================
209208
// Methods inherited from Boundary2D
210209

211-
public Collection<Contour2D> boundaryCurves() {
212-
ArrayList<Contour2D> list =
213-
new ArrayList<Contour2D>(1);
214-
list.add(this);
215-
return list;
216-
}
217-
218210
public Domain2D domain() {
219211
return new GenericDomain2D(this);
220212
}

tests/src/math/geom2d/line/StraightLine2DTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public void testGetBoundaryCurves() {
110110
Vector2D v0 = new Vector2D(10, 20);
111111
StraightLine2D line = new StraightLine2D(p0, v0);
112112

113-
assertEquals(1, line.boundaryCurves().size());
113+
assertEquals(1, line.continuousCurves().size());
114114
}
115115

116116
public void testIsBounded() {

0 commit comments

Comments
 (0)