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

Fields inherited from class util.TimeStampedObject
birthTime
 
Constructor Summary
TextObject(String iText, int iUrgency, String iSummary, long iTimeToLive, String iSender, ArrayList iRecipients, boolean iPrivate)
           
 
Method Summary
 boolean expired()
          Lets you know if this item has expired
 ArrayList getRecipients()
           
 long getRemainingTimeToLive()
          Returns the remaining time to live (a reallylarge number if the object never expires)
 String getSender()
           
 String getSummary()
           
 String getText()
           
 long getTimeToLive()
          Returns the total amount of time this thing was allowed to live
 int getUrgency()
           
 boolean isPrivate()
           
 String toString()
           
 
Methods inherited from class util.TimeStampedObject
getAge, getCreationTime, resetCreationTime, resetCreationTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextObject

public TextObject(String iText,
                  int iUrgency,
                  String iSummary,
                  long iTimeToLive,
                  String iSender,
                  ArrayList iRecipients,
                  boolean iPrivate)
Method Detail

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