Package com.woorea.openstack.base.client
Class Entity<T>
- java.lang.Object
-
- com.woorea.openstack.base.client.Entity<T>
-
public class Entity<T> extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
contentType
private T
entity
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
-
-
Field Detail
-
entity
private T entity
-
contentType
private java.lang.String contentType
-
-
Constructor Detail
-
Entity
public Entity(T entity, java.lang.String contentType)
-
-
Method Detail
-
json
public static <T> Entity<T> json(T entity)
-
stream
public static <T> Entity<T> stream(T entity)
-
getEntity
public T getEntity()
- Returns:
- the entity
-
setEntity
public void setEntity(T entity)
- Parameters:
entity
- the entity to set
-
getContentType
public java.lang.String getContentType()
- Returns:
- the contentType
-
setContentType
public void setContentType(java.lang.String contentType)
- Parameters:
contentType
- the contentType to set
-
-