agentland.text
Class TextObject
java.lang.Object
|
+--util.TimeStampedObject
|
+--agentland.text.TextObject
- All Implemented Interfaces:
- Serializable
- public class TextObject
- extends TimeStampedObject
- implements Serializable
class TextObject is a wrapper that include an information regarding
the "text" that an agent can create. This includes
-text
-urgency 1(lowest)-5(higest)
-summary of the text
-time to live
-sender
-recipients (more than one)
-private (if private, should show only to recipient)
- See Also:
Serializable
, Serialized Form
TextObject
public TextObject(String iText,
int iUrgency,
String iSummary,
long iTimeToLive,
String iSender,
ArrayList iRecipients,
boolean iPrivate)
getText
public String getText()
getUrgency
public int getUrgency()
getSummary
public String getSummary()
getTimeToLive
public long getTimeToLive()
- Returns the total amount of time this thing was allowed to live
getRemainingTimeToLive
public long getRemainingTimeToLive()
- Returns the remaining time to live (a reallylarge number if the
object never expires)
expired
public boolean expired()
- Lets you know if this item has expired
getSender
public String getSender()
getRecipients
public ArrayList getRecipients()
isPrivate
public boolean isPrivate()
toString
public String toString()
- Overrides:
toString
in class Object