public class Entity<T>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
contentType |
private T |
entity |
Constructor and Description |
---|
Entity(T entity,
java.lang.String contentType) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getContentType() |
T |
getEntity() |
static <T> Entity<T> |
json(T entity) |
void |
setContentType(java.lang.String contentType) |
void |
setEntity(T entity) |
static <T> Entity<T> |
stream(T entity) |
private T entity
private java.lang.String contentType
public Entity(T entity, java.lang.String contentType)
public static <T> Entity<T> json(T entity)
public static <T> Entity<T> stream(T entity)
public T getEntity()
public void setEntity(T entity)
entity
- the entity to setpublic java.lang.String getContentType()
public void setContentType(java.lang.String contentType)
contentType
- the contentType to set