public final class LayoutLocation extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
LayoutLocation.Type
Designates the type of location; either geographic or logical grid.
|
| Modifier and Type | Method and Description |
|---|---|
static List<LayoutLocation> |
fromCompactListString(String compactList)
Returns a list of layout locations from a compact string representation.
|
static LayoutLocation |
fromCompactString(String s)
Produces a layout location instance from a compact string representation.
|
String |
id()
Returns the identifier associated with this location.
|
boolean |
isOrigin()
Returns true if the coordinates indicate the origin (0, 0) of the
coordinate system; false otherwise.
|
double |
latOrY()
Returns the latitude (geo) or y-coord (grid) data value.
|
static LayoutLocation |
layoutLocation(String id,
LayoutLocation.Type locType,
double latOrY,
double longOrX)
Creates an instance of a layout location.
|
static LayoutLocation |
layoutLocation(String id,
String locType,
double latOrY,
double longOrX)
Creates an instance of a layout location.
|
LayoutLocation.Type |
locType()
Returns the location type (geo or grid), which indicates how the data
is to be interpreted.
|
double |
longOrX()
Returns the longitude (geo) or x-coord (grid) data value.
|
String |
toCompactListString()
Produces a compact string representation of this instance.
|
static String |
toCompactListString(LayoutLocation... locs)
Produces a compact encoding of a list of layout locations.
|
static String |
toCompactListString(List<LayoutLocation> locs)
Produces a compact encoding of a list of layout locations.
|
String |
toString() |
public boolean isOrigin()
public String id()
public LayoutLocation.Type locType()
public double latOrY()
public double longOrX()
public String toCompactListString()
public static LayoutLocation fromCompactString(String s)
s - the compact stringpublic static String toCompactListString(LayoutLocation... locs)
locs - array of layout location instancespublic static String toCompactListString(List<LayoutLocation> locs)
locs - list of layout location instancespublic static List<LayoutLocation> fromCompactListString(String compactList)
compactList - string representationpublic static LayoutLocation layoutLocation(String id, LayoutLocation.Type locType, double latOrY, double longOrX)
id - an identifier for the item at this locationlocType - the location typelatOrY - geo latitude / grid y-coordlongOrX - geo longitude / grid x-coordpublic static LayoutLocation layoutLocation(String id, String locType, double latOrY, double longOrX)
id - an identifier for the item at this locationlocType - the location type ("geo" or "grid")latOrY - geo latitude / grid y-coordlongOrX - geo longitude / grid x-coordIllegalArgumentException - if the type is not "geo" or "grid"