Package com.sothawo.mapjfx
Class Extent
- java.lang.Object
-
- com.sothawo.mapjfx.Extent
-
public final class Extent extends java.lang.Object
An extent defines an area by two coordinates: min latitude/min longitude and max latitude/max longitude.- Author:
- P.J. Meisch ([email protected]).
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
static Extent
forCoordinates(Coordinate... coordinates)
creates the extent of the given coordinates.static Extent
forCoordinates(java.util.Collection<? extends Coordinate> coordinates)
creates the extent of the given coordinates.Coordinate
getMax()
Coordinate
getMin()
int
hashCode()
java.lang.String
toString()
-
-
-
Method Detail
-
forCoordinates
public static Extent forCoordinates(Coordinate... coordinates)
creates the extent of the given coordinates.- Parameters:
coordinates
- the coordinates- Returns:
- Extent for the coorinates
- Throws:
java.lang.IllegalArgumentException
- when less than 2 coordinates or null are passed injava.lang.NullPointerException
- when coordinates is null
-
forCoordinates
public static Extent forCoordinates(java.util.Collection<? extends Coordinate> coordinates)
creates the extent of the given coordinates.- Parameters:
coordinates
- the coordinates- Returns:
- Extent for the coorinates
- Throws:
java.lang.IllegalArgumentException
- when less than 2 coordinates or null are passed injava.lang.NullPointerException
- when coordinates is null
-
getMax
public Coordinate getMax()
-
getMin
public Coordinate getMin()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-