Package net.pl3x.map.core.markers.marker
Class Rectangle
- All Implemented Interfaces:
JsonSerializable
Represents a rectangle marker.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic RectanglefromJson(com.google.gson.JsonObject obj) Get the firstPointof this rectangle.Get the secondPointof this rectangle.inthashCode()static RectangleCreate a new rectangle.static RectangleCreate a new rectangle.Set the firstPointof this rectangle.Set the secondPointof this rectangle.com.google.gson.JsonObjecttoJson()Jsonify this object.toString()Methods inherited from class net.pl3x.map.core.markers.marker.Marker
circle, circle, ellipse, ellipse, ellipse, ellipse, ellipse, ellipse, ellipse, ellipse, getOptions, getPane, getType, icon, icon, icon, icon, icon, icon, icon, multiPolygon, multiPolygon, multiPolygon, multiPolyline, multiPolyline, multiPolyline, polygon, polygon, polygon, polyline, polyline, polyline, rectangle, rectangle, setOptions, setOptions, setPane
-
Constructor Details
-
Rectangle
Create a new rectangle.- Parameters:
key- identifying keyx1- first x pointz1- first z pointx2- second x pointz2- second z point
-
Rectangle
Create a new rectangle.- Parameters:
key- identifying keypoint1- first pointpoint2- second point
-
-
Method Details
-
of
Create a new rectangle.- Parameters:
key- identifying keyx1- first x pointz1- first z pointx2- second x pointz2- second z point- Returns:
- a new rectangle
-
of
Create a new rectangle.- Parameters:
key- identifying keypoint1- first pointpoint2- second point- Returns:
- a new rectangle
-
getPoint1
Get the firstPointof this rectangle.- Returns:
- first point
-
setPoint1
Set the firstPointof this rectangle.- Parameters:
point1- first point- Returns:
- this rectangle
-
getPoint2
Get the secondPointof this rectangle.- Returns:
- second point
-
setPoint2
Set the secondPointof this rectangle.- Parameters:
point2- second point- Returns:
- this rectangle
-
toJson
public com.google.gson.JsonObject toJson()Description copied from interface:JsonSerializableJsonify this object.- Returns:
- object as json element
-
fromJson
-
equals
-
hashCode
public int hashCode() -
toString
-