public abstract class Entity extends Object implements Serializable, Comparable<Entity>, JsonSerializable
| Modifier and Type | Field and Description |
|---|---|
String |
entityReference |
URL |
entityURL |
String |
id |
| Constructor and Description |
|---|
Entity(String id,
String entityReference,
URL entityURL) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Entity object) |
boolean |
equals(Object o) |
static Entity[] |
fromJsonArray(com.google.gson.JsonArray jsonArray,
Class typeClass)
Creates an array of Entities by a JsonArray and the cast type
|
static Entity |
fromJsonObject(com.google.gson.JsonObject jsonObject,
Class typeClass)
Creates an Entity by a JsonObject and the cast type
|
int |
hashCode() |
static com.google.gson.JsonArray |
toJsonArray(Entity... entities)
Creates a JsonArray by a sequence of entities
|
com.google.gson.JsonObject |
toJsonObject()
Creates the JsonObject of the Entity
|
@Nullable public final String id
@NotNull public final String entityReference
@NotNull public final URL entityURL
@NotNull public static Entity fromJsonObject(@NotNull com.google.gson.JsonObject jsonObject, @NotNull Class typeClass)
jsonObject - The JsonObjecttypeClass - The class@NotNull public static com.google.gson.JsonArray toJsonArray(Entity... entities)
entities - The entities@NotNull public static Entity[] fromJsonArray(@NotNull com.google.gson.JsonArray jsonArray, @NotNull Class typeClass)
jsonArray - The JsonArraytypeClass - The ArrayClass@NotNull public com.google.gson.JsonObject toJsonObject()
toJsonObject in interface JsonSerializablepublic int compareTo(@NotNull
Entity object)
compareTo in interface Comparable<Entity>Copyright © 2016. All rights reserved.