|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectedu.berkeley.guir.ptk.PTK
edu.berkeley.guir.ptk.Events
Convenience class for a collection of Event objects. This class is used in InputSource objects to enable easier creation and dispatch of multiple Event objects. If one Event object is created, the Events object can be treated exactly like a single Event object. If multiple Event objects are created, the you can add them to the Events object as you would a Vector. This class can also be used to perform an action to multiple Event objects with one method call (e.g., addMetadata(MetadataItem) adds the given MetadataItem to all Event objects in this Events object.
| Field Summary |
| Fields inherited from class edu.berkeley.guir.ptk.PTK |
debug, MAX_DEBUG, MED_DEBUG, MIN_DEBUG, NO_DEBUG |
| Constructor Summary | |
Events()
|
|
Events(Event e)
Initializes this object and adds the given Event to it. |
|
Events(Event[] e)
Initializes this object and adds the given Event objects to it. |
|
Events(java.lang.String id,
java.lang.String value)
Initializes this object, creates a new Event object within this, and adds the ID and data value to it. |
|
| Method Summary | |
void |
add(Event e)
Adds the given Event to this. |
void |
add(Events e)
Adds all the Event objects in the given Events to this. |
void |
addData(Data d)
Adds the given Data to each Event in this Events object. |
void |
addMetadata(Metadata md)
Adds the given Metadata to each Event in this Events object. |
void |
addMetadata(MetadataItem md)
Adds the given MetadataItem to each Event in this Events object. |
boolean |
contains(Event e)
Returns true if the Event e is included in this. |
boolean |
contains(Events e)
Returns true if the Event objects at index 0 in e is included in this. |
boolean |
containsAll(Events e)
Returns true if all the Event objects in e are included in this. |
boolean |
equals(Events e)
Returns true if all the Event objects in e are contained in this. |
Event |
get(int i)
Get the Event at index i in this. |
java.util.Vector |
getAll()
Get all the Event objects in this. |
Event[] |
getAsArray()
Get all the Event objects in this as an array. |
boolean |
isEmpty()
Returns true if this has no Event objects. |
void |
set(int i,
Event e)
|
int |
size()
Returns an integer indicating how many Event objects are included in this. |
| Methods inherited from class edu.berkeley.guir.ptk.PTK |
getMAX, getMED, getMIN, getNO, printDebug, printDebug, printError |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Events()
public Events(java.lang.String id,
java.lang.String value)
id - data IDvalue - data valuepublic Events(Event e)
e - Event to add to this.public Events(Event[] e)
e - an array of Event objects to add to this.| Method Detail |
public boolean equals(Events e)
e - Events object to check for equivalence to this.
public void addData(Data d)
d - public void addMetadata(MetadataItem md)
public void addMetadata(Metadata md)
public void add(Event e)
e - Event to add.public void add(Events e)
e - Events to add.
public void set(int i,
Event e)
public boolean isEmpty()
public int size()
public boolean contains(Events e)
e - Events of size 1 to check for in this Events.
public boolean contains(Event e)
e - Event to check for in this Events.
public boolean containsAll(Events e)
e - Events to check for in this Events.
public Event get(int i)
i - index of Event to get.
public java.util.Vector getAll()
public Event[] getAsArray()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||