Compoze Software, Inc.

com.compoze.trigger
Interface ITriggerList

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
TreeSetTriggerList

public interface ITriggerList
extends java.io.Serializable

Classes that implement this interface store a list of trigger events.


Method Summary
 long add(Trigger trigger)
          Adds the trigger to the trigger list.
 Trigger find(long lTriggerID)
          Finds a trigger by the specified trigger ID.
 Trigger getEarliestTrigger()
          Gets the earliest trigger in the list.
 boolean isEmpty()
          Checks if the trigger list is empty.
 boolean remove(long lTriggerID)
          Removes a trigger from the trigger list by the specified ID.
 boolean remove(Trigger trigger)
          Removes the trigger from the trigger list.
 int size()
          Gets the size of the trigger list.
 

Method Detail

add


public long add(Trigger trigger)
Adds the trigger to the trigger list.
Parameters:
trigger - the trigger to add
Returns:
the unique identifier for the trigger (the trigger ID), which should be the same as the passed in ID

remove


public boolean remove(Trigger trigger)
Removes the trigger from the trigger list.
Parameters:
trigger - the trigger to remove
Returns:
true if the trigger was found and removed; false otherwise if not found

remove


public boolean remove(long lTriggerID)
Removes a trigger from the trigger list by the specified ID.
Parameters:
lTriggerID - id of trigger
Returns:
true if the trigger was found and removed; false otherwise if not found

find


public Trigger find(long lTriggerID)
Finds a trigger by the specified trigger ID.
Parameters:
lTriggerID - the trigger ID
Returns:
the trigger or null if not found

getEarliestTrigger


public Trigger getEarliestTrigger()
Gets the earliest trigger in the list.
Returns:
the earliest trigger in the list or null if there are no triggers in the list

isEmpty


public boolean isEmpty()
Checks if the trigger list is empty.
Returns:
true if the trigger list is empty; false otherwise

size


public int size()
Gets the size of the trigger list. This is the number of triggers in the list.
Returns:
the number of triggers in the list or -1 if not available

Compoze Software, Inc.

Copyright ©1999-2001 Compoze Software, Inc. All rights reserved.