|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||
java.lang.Objectjava.lang.Enum<CompassPoint>
com.guiseframework.geometry.CompassPoint
public enum CompassPoint
Navigational directions.
| Field Summary | |
|---|---|
static java.math.BigDecimal |
MAX_BEARING
The maximum bearing available; synonymous with NORTH. |
| Method Summary | |
|---|---|
static java.math.BigDecimal |
checkBearing(java.math.BigDecimal bearing)
Checks to ensure that the given bearing is valid. |
java.lang.String |
getAbbreviation()
|
java.math.BigDecimal |
getBearing()
|
static CompassPoint |
getCompassPoint(java.math.BigDecimal bearing)
Determines the closes compass point to the given bearing. |
static CompassPoint |
getOrdinalCompassPoint(CompassPoint latitudeCompassPoint,
CompassPoint longitudeCompassPoint)
Returns the ordinal or inter-cardinal compass point corresonding to 45 degrees between the given cardinal latitude and longitude compass points. |
boolean |
isCardinal()
|
boolean |
isOrdinal()
|
static CompassPoint |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static CompassPoint[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final CompassPoint NORTH
public static final CompassPoint NORTH_BY_EAST
public static final CompassPoint NORTH_NORTHEAST
public static final CompassPoint NORTHEAST_BY_NORTH
public static final CompassPoint NORTHEAST
public static final CompassPoint NORTHEAST_BY_EAST
public static final CompassPoint EAST_NORTHEAST
public static final CompassPoint EAST_BY_NORTH
public static final CompassPoint EAST
public static final CompassPoint EAST_BY_SOUTH
public static final CompassPoint EAST_SOUTHEAST
public static final CompassPoint SOUTHEAST_BY_EAST
public static final CompassPoint SOUTHEAST
public static final CompassPoint SOUTHEAST_BY_SOUTH
public static final CompassPoint SOUTH_SOUTHEAST
public static final CompassPoint SOUTH_BY_EAST
public static final CompassPoint SOUTH
public static final CompassPoint SOUTH_BY_WEST
public static final CompassPoint SOUTH_SOUTHWEST
public static final CompassPoint SOUTHWEST_BY_SOUTH
public static final CompassPoint SOUTHWEST
public static final CompassPoint SOUTHWEST_BY_WEST
public static final CompassPoint WEST_SOUTHWEST
public static final CompassPoint WEST_BY_SOUTH
public static final CompassPoint WEST
public static final CompassPoint WEST_BY_NORTH
public static final CompassPoint WEST_NORTHWEST
public static final CompassPoint NORTHWEST_BY_WEST
public static final CompassPoint NORTHWEST
public static final CompassPoint NORTHWEST_BY_NORTH
public static final CompassPoint NORTH_NORTHWEST
public static final CompassPoint NORTHBY_WEST
| Field Detail |
|---|
public static final java.math.BigDecimal MAX_BEARING
NORTH.
| Method Detail |
|---|
public static CompassPoint[] values()
for (CompassPoint c : CompassPoint.values()) System.out.println(c);
public static CompassPoint valueOf(java.lang.String name)
name - the name of the enum constant to be returned.
java.lang.IllegalArgumentException - if this enum type has no constant
with the specified name
java.lang.NullPointerException - if the argument is nullpublic java.lang.String getAbbreviation()
public java.math.BigDecimal getBearing()
public boolean isCardinal()
public boolean isOrdinal()
public static CompassPoint getCompassPoint(java.math.BigDecimal bearing)
bearing - The bearing for which a compass point should be returned.
java.lang.IllegalArgumentException - if the given bearing is greater than 360.
public static CompassPoint getOrdinalCompassPoint(CompassPoint latitudeCompassPoint,
CompassPoint longitudeCompassPoint)
latitudeCompassPoint - The cardinal compass point of the latitude; either WEST or EAST.longitudeCompassPoint - The cardinal compass point of the longitude; either NORTH or SOUTH.
java.lang.NullPointerException - if the given latitude and/or longitude compass point is null.
java.lang.IllegalArgumentException - if the given latitude compass point is not WEST or EAST;
and/or if the given longitude compass point is not NORTH or SOUTH.public static java.math.BigDecimal checkBearing(java.math.BigDecimal bearing)
bearing - The bearing to check.
java.lang.IllegalArgumentException - if the given bearing is greater than 360.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||