|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.twitterapime.model.DefaultEntity
public class DefaultEntity
This class provides a basic implementation of Entity interface.
Tweet
,
Credential
,
RateLimitStatus
,
UserAccount
Field Summary | |
---|---|
protected java.util.Hashtable |
data
Hashtable object that stores the attributes/values. |
Constructor Summary | |
---|---|
DefaultEntity()
Create an instance of DefaultEntity class. |
|
DefaultEntity(java.util.Hashtable data)
Create an instance of DefaultEntity class. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
|
java.lang.Object[] |
getArray(java.lang.String attr)
Get the values of an array attribute. |
java.util.Date |
getDate(java.lang.String attr)
Get the value of a date attribute. |
int |
getInt(java.lang.String attr)
Get the value of an int attribute. |
long |
getLong(java.lang.String attr)
Get the value of a long attribute. |
java.lang.Object |
getObject(java.lang.String attr)
Get the value of an object attribute. |
java.lang.String |
getString(java.lang.String attr)
Get the value of a string attribute. |
int |
hashCode()
|
void |
setData(DefaultEntity e)
Set the given entity's data to the object. |
void |
setData(java.util.Hashtable data)
Set a new pack of attributes/values. |
int |
size()
Return the number of entries in the entity. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.util.Hashtable data
Hashtable object that stores the attributes/values.
Constructor Detail |
---|
public DefaultEntity()
Create an instance of DefaultEntity class.
public DefaultEntity(java.util.Hashtable data)
Create an instance of DefaultEntity class.
data
- The initial attributes/values.Method Detail |
---|
public final void setData(java.util.Hashtable data)
Set a new pack of attributes/values.
data
- Pack of attributes/values.public final void setData(DefaultEntity e)
Set the given entity's data to the object.
e
- Entity.public final java.lang.Object[] getArray(java.lang.String attr)
Entity
Get the values of an array attribute.
getArray
in interface Entity
attr
- Array attribute to query the data for.
Entity.getArray(java.lang.String)
public final java.util.Date getDate(java.lang.String attr)
Entity
Get the value of a date attribute.
getDate
in interface Entity
attr
- Date attribute to query the data for.
Entity.getDate(java.lang.String)
public final int getInt(java.lang.String attr)
Entity
Get the value of an int attribute.
getInt
in interface Entity
attr
- Int attribute to query the data for.
Entity.getInt(java.lang.String)
public final long getLong(java.lang.String attr)
Entity
Get the value of a long attribute.
getLong
in interface Entity
attr
- Long attribute to query the data for.
Entity.getLong(java.lang.String)
public final java.lang.Object getObject(java.lang.String attr)
Entity
Get the value of an object attribute.
getObject
in interface Entity
attr
- Object attribute to query the data for.
Entity.getObject(java.lang.String)
public final java.lang.String getString(java.lang.String attr)
Entity
Get the value of a string attribute.
getString
in interface Entity
attr
- String attribute to query the data for.
Entity.getString(java.lang.String)
public final boolean equals(java.lang.Object o)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public final int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public final java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public final int size()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |