public class PlaceEntity
extends java.lang.Object
Place
.Modifier and Type | Field and Description |
---|---|
private java.lang.String |
author_
The author of the text read on this place.
|
private com.mapbox.mapboxsdk.geometry.LatLng |
center_
The centroid of this place.
|
private java.lang.String |
id_
Unique identifier.
|
private java.lang.String |
name_
The name of this place.
|
private java.util.ArrayList<com.mapbox.mapboxsdk.geometry.LatLng> |
points_
A list of
LatLng for the base polygon points' locations. |
private org.json.JSONObject |
shape_
A
JSONObject describing the polygon of the sound audible area. |
private org.json.JSONObject |
theme_
A
JSONObject describing fill and stroke colors of this place's polygon. |
Modifier | Constructor and Description |
---|---|
private |
PlaceEntity(java.lang.String id,
java.lang.String name,
java.lang.String author,
org.json.JSONObject theme,
org.json.JSONObject shape)
Private constructor since we always use
from_cursor(Cursor) to create new instances. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
author() |
com.mapbox.mapboxsdk.geometry.LatLng |
center() |
int[] |
colors(java.lang.String edge)
|
static PlaceEntity |
from_cursor(android.database.Cursor cursor)
Creates a new
PlaceEntity instance from a SQLite response. |
java.lang.String |
id() |
java.lang.String |
name() |
java.util.ArrayList<com.mapbox.mapboxsdk.geometry.LatLng> |
points() |
org.json.JSONObject |
shape() |
java.lang.String |
toString() |
private final java.lang.String id_
private final java.lang.String name_
private final java.lang.String author_
private final org.json.JSONObject theme_
JSONObject
describing fill and stroke colors of this place's polygon.private final org.json.JSONObject shape_
JSONObject
describing the polygon of the sound audible area.private java.util.ArrayList<com.mapbox.mapboxsdk.geometry.LatLng> points_
LatLng
for the base polygon points' locations.private com.mapbox.mapboxsdk.geometry.LatLng center_
private PlaceEntity(java.lang.String id, java.lang.String name, java.lang.String author, org.json.JSONObject theme, org.json.JSONObject shape)
from_cursor(Cursor)
to create new instances.id
- The idname
- The nameauthor
- The author of the underlying readingtheme
- A JSONObject
for the polygon themeshape
- A JSONObject
for the polygon shape@Nullable public static PlaceEntity from_cursor(android.database.Cursor cursor)
PlaceEntity
instance from a SQLite
response.cursor
- The Cursor
responsePlaceEntity
instance or null
is a JSONException
is encountered.@NonNull public int[] colors(java.lang.String edge)
Color.WHITE
if no theme can be found.public final java.lang.String id()
public final java.lang.String name()
public final java.lang.String author()
public final org.json.JSONObject shape()
public com.mapbox.mapboxsdk.geometry.LatLng center()
public java.util.ArrayList<com.mapbox.mapboxsdk.geometry.LatLng> points()
public java.lang.String toString()
toString
in class java.lang.Object