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