public class Resource extends Object implements Serializable
| Modifier | Constructor and Description |
|---|---|
protected |
Resource(Object id)
Constructor
|
|
Resource(Object id,
String text)
Constructor
|
|
Resource(Object id,
String text,
String color)
Constructor
|
protected |
Resource(String id)
Constructor
|
|
Resource(String id,
String text)
Constructor
|
|
Resource(String id,
String text,
String color)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object object) |
String |
getColor()
Gets the color of the resource (ie: #336699)
|
<T> T |
getId()
Gets the resource id
Caution: not type-safe |
String |
getText()
Gets the text of the resource (ie: the name of the resource)
|
int |
hashCode() |
void |
set(String field,
Object value)
Sets a field's value
|
void |
setColor(String color)
Sets the color of the resource (ie: #336699)
|
void |
setText(String text)
Sets the text of the resource (ie: the name of the resource)
|
String |
toString()
Gets the JSON representation of this
Resource |
protected Resource(String id)
id - - the resource idprotected Resource(Object id)
id - - the resource idpublic Resource(String id, String text)
id - - the resource idtext - - the text (ie: the name of the resource)public Resource(Object id, String text)
id - - the resource idtext - - the text (ie: the name of the resource)public Resource(String id, String text, String color)
id - - the resource idtext - - the text (ie: the name of the resource)color - - the color (ie: #336699)public <T> T getId()
T - the object typepublic String getText()
public void setText(String text)
text - - the textpublic String getColor()
public void setColor(String color)
color - - the colorpublic void set(String field, Object value)
field - the field namevalue - the valueCopyright © 2021 7thWeb. All rights reserved.