public abstract class

AbstractEventSet

extends EventObject
implements EventSet
java.lang.Object
   ↳ java.util.EventObject
     ↳ com.sun.tools.example.debug.event.AbstractEventSet
Known Direct Subclasses
Known Indirect Subclasses

Summary

[Expand]
Inherited Fields
From class java.util.EventObject
Public Methods
boolean add(Event e)
boolean addAll(Collection<? extends Event> coll)
void clear()
Removes all of the elements from this set (optional operation).
boolean contains(Object o)
Returns true if this set contains the specified element.
boolean containsAll(Collection<?> c)
Returns true if this set contains all of the elements of the specified collection.
EventIterator eventIterator()
Return an iterator specific to Event objects.
int getSuspendPolicy()
Returns the policy used to suspend threads in the target VM for this event set.
VirtualMachine getVirtualMachine()
boolean isEmpty()
Returns true if this set contains no elements.
Iterator<Event> iterator()
Returns an iterator over the elements in this set.
abstract void notify(JDIListener listener)
boolean remove(Object o)
Removes the specified element from this set if it is present (optional operation).
boolean removeAll(Collection<?> coll)
Removes from this set all of its elements that are contained in the specified collection (optional operation).
void resume()
Resumes threads suspended by this event set.
boolean retainAll(Collection<?> coll)
Retains only the elements in this set that are contained in the specified collection (optional operation).
int size()
Returns the number of elements in this set (its cardinality).
int suspendPolicy()
Returns the policy used to suspend threads in the target VM for this event set.
boolean suspendedAll()
boolean suspendedEventThread()
boolean suspendedNone()
<T> T[] toArray(T[] a)
Returns an array containing all of the elements in this set whose runtime type is that of the specified array.
Object[] toArray()
Returns an array containing all of the elements in this set.
static AbstractEventSet toSpecificEventSet(EventSet jdiEventSet)
VirtualMachine virtualMachine()
Gets the VirtualMachine to which this Mirror belongs.
[Expand]
Inherited Methods
From class java.util.EventObject
From class java.lang.Object
From interface com.sun.jdi.Mirror
From interface com.sun.jdi.event.EventSet
From interface java.lang.Iterable
From interface java.util.Collection
From interface java.util.Set

Public Methods

public boolean add (Event e)

public boolean addAll (Collection<? extends Event> coll)

public void clear ()

Removes all of the elements from this set (optional operation). The set will be empty after this call returns.

public boolean contains (Object o)

Returns true if this set contains the specified element. More formally, returns true if and only if this set contains an element e such that (o==null ? e==null : o.equals(e)).

Parameters
o element whose presence in this set is to be tested
Returns
  • true if this set contains the specified element.

public boolean containsAll (Collection<?> c)

Returns true if this set contains all of the elements of the specified collection. If the specified collection is also a set, this method returns true if it is a subset of this set.

Parameters
c collection to be checked for containment in this set.
Returns
  • true if this set contains all of the elements of the specified collection.

public EventIterator eventIterator ()

Return an iterator specific to Event objects.

public int getSuspendPolicy ()

Returns the policy used to suspend threads in the target VM for this event set. This policy is selected from the suspend policies for each event's request. The one that suspends the most threads is chosen when the event occurs in the target VM and that policy is returned here. See com.sun.jdi.request.EventRequest for the possible policy values.

Returns
  • the integer suspendPolicy

public VirtualMachine getVirtualMachine ()

public boolean isEmpty ()

Returns true if this set contains no elements.

Returns
  • true if this set contains no elements.

public Iterator<Event> iterator ()

Returns an iterator over the elements in this set. The elements are returned in no particular order (unless this set is an instance of some class that provides a guarantee).

Returns
  • an iterator over the elements in this set.

public abstract void notify (JDIListener listener)

public boolean remove (Object o)

Removes the specified element from this set if it is present (optional operation). More formally, removes an element e such that (o==null ? e==null : o.equals(e)), if this set contains such an element. Returns true if this set contained the element (or equivalently, if this set changed as a result of the call). (This set will not contain the element once the call returns.)

Parameters
o object to be removed from this set, if present
Returns
  • true if this set contained the specified element

public boolean removeAll (Collection<?> coll)

Removes from this set all of its elements that are contained in the specified collection (optional operation). If the specified collection is also a set, this operation effectively modifies this set so that its value is the asymmetric set difference of the two sets.

Parameters
coll collection containing elements to be removed from this set
Returns
  • true if this set changed as a result of the call

public void resume ()

Resumes threads suspended by this event set. If the suspendPolicy() is SUSPEND_ALL, a call to this method is equivalent to resume(). If the suspend policy is SUSPEND_EVENT_THREAD, a call to this method is equivalent to resume() for the event thread. Otherwise, a call to this method is a no-op.

public boolean retainAll (Collection<?> coll)

Retains only the elements in this set that are contained in the specified collection (optional operation). In other words, removes from this set all of its elements that are not contained in the specified collection. If the specified collection is also a set, this operation effectively modifies this set so that its value is the intersection of the two sets.

Parameters
coll collection containing elements to be retained in this set
Returns
  • true if this set changed as a result of the call

public int size ()

Returns the number of elements in this set (its cardinality). If this set contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

Returns
  • the number of elements in this set (its cardinality).

public int suspendPolicy ()

Returns the policy used to suspend threads in the target VM for this event set. This policy is selected from the suspend policies for each event's request; the target VM chooses the policy which suspends the most threads. The target VM suspends threads according to that policy and that policy is returned here. See EventRequest for the possible policy values.

In rare cases, the suspend policy may differ from the requested value if a ClassPrepareEvent has occurred in a debugger system thread. See thread() for details.

Returns

public boolean suspendedAll ()

public boolean suspendedEventThread ()

public boolean suspendedNone ()

public T[] toArray (T[] a)

Returns an array containing all of the elements in this set whose runtime type is that of the specified array. Obeys the general contract of the Collection.toArray(Object[]) method.

Parameters
a the array into which the elements of this set are to be stored, if it is big enough { return jdiEventSet.XXX(); } otherwise, a new array of the same runtime type is allocated for this purpose.
Returns
  • an array containing the elements of this set.
Throws
ArrayStoreException the runtime type of a is not a supertype of the runtime type of every element in this set.

public Object[] toArray ()

Returns an array containing all of the elements in this set. Obeys the general contract of the Collection.toArray method.

Returns
  • an array containing all of the elements in this set.

public static AbstractEventSet toSpecificEventSet (EventSet jdiEventSet)

public VirtualMachine virtualMachine ()

Gets the VirtualMachine to which this Mirror belongs. A Mirror must be associated with a VirtualMachine to have any meaning.

Returns