small refactoring
This commit is contained in:
parent
294040aaf9
commit
8d9ae28ddf
2 changed files with 11 additions and 5 deletions
|
@ -8,7 +8,6 @@ public abstract class GeometryWayStyle<T extends GeometryWayContext> {
|
|||
private T context;
|
||||
protected Integer color;
|
||||
protected Float width;
|
||||
protected Integer pointColor;
|
||||
|
||||
public GeometryWayStyle(T context) {
|
||||
this.context = context;
|
||||
|
@ -19,11 +18,10 @@ public abstract class GeometryWayStyle<T extends GeometryWayContext> {
|
|||
this.color = color;
|
||||
}
|
||||
|
||||
public GeometryWayStyle(T context, Integer color, Float width, Integer pointColor) {
|
||||
public GeometryWayStyle(T context, Integer color, Float width) {
|
||||
this.context = context;
|
||||
this.color = color;
|
||||
this.width = width;
|
||||
this.pointColor = pointColor;
|
||||
}
|
||||
|
||||
public T getContext() {
|
||||
|
@ -47,7 +45,7 @@ public abstract class GeometryWayStyle<T extends GeometryWayContext> {
|
|||
}
|
||||
|
||||
public Integer getPointColor() {
|
||||
return pointColor;
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean isNightMode() {
|
||||
|
|
|
@ -68,9 +68,12 @@ public class RouteGeometryWay extends GeometryWay<RouteGeometryWayContext, Geome
|
|||
|
||||
private static class GeometrySolidWayStyle extends GeometryWayStyle<RouteGeometryWayContext> {
|
||||
|
||||
private Integer pointColor;
|
||||
|
||||
GeometrySolidWayStyle(RouteGeometryWayContext context, Integer color, Float width,
|
||||
Integer pointColor) {
|
||||
super(context, color, width, pointColor);
|
||||
super(context, color, width);
|
||||
this.pointColor = pointColor;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -78,6 +81,11 @@ public class RouteGeometryWay extends GeometryWay<RouteGeometryWayContext, Geome
|
|||
return getContext().getArrowBitmap();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getPointColor() {
|
||||
return pointColor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
if (this == other) {
|
||||
|
|
Loading…
Reference in a new issue