org.freedesktop.dbus
Class DBusConnection.PeerSet

java.lang.Object
  extended by org.freedesktop.dbus.DBusConnection.PeerSet
All Implemented Interfaces:
Iterable<String>, Collection<String>, Set<String>, DBusSigHandler<DBus.NameOwnerChanged>
Enclosing class:
DBusConnection

public class DBusConnection.PeerSet
extends Object
implements Set<String>, DBusSigHandler<DBus.NameOwnerChanged>

Add addresses of peers to a set which will watch for them to disappear and automatically remove them from the set.


Constructor Summary
DBusConnection.PeerSet()
           
 
Method Summary
 boolean add(String address)
           
 boolean addAll(Collection<? extends String> addresses)
           
 void clear()
           
 boolean contains(Object o)
           
 boolean containsAll(Collection<?> os)
           
 boolean equals(Object o)
           
 void handle(DBus.NameOwnerChanged noc)
          Handle a signal.
 int hashCode()
           
 boolean isEmpty()
           
 Iterator<String> iterator()
           
 boolean remove(Object o)
           
 boolean removeAll(Collection<?> os)
           
 boolean retainAll(Collection<?> os)
           
 int size()
           
 Object[] toArray()
           
<T> T[]
toArray(T[] a)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBusConnection.PeerSet

public DBusConnection.PeerSet()
Method Detail

handle

public void handle(DBus.NameOwnerChanged noc)
Description copied from interface: DBusSigHandler
Handle a signal.

Specified by:
handle in interface DBusSigHandler<DBus.NameOwnerChanged>
Parameters:
noc - The signal to handle. If such a class exists, the signal will be an instance of the class with the correct type signature. Otherwise it will be an instance of DBusSignal

add

public boolean add(String address)
Specified by:
add in interface Collection<String>
Specified by:
add in interface Set<String>

addAll

public boolean addAll(Collection<? extends String> addresses)
Specified by:
addAll in interface Collection<String>
Specified by:
addAll in interface Set<String>

clear

public void clear()
Specified by:
clear in interface Collection<String>
Specified by:
clear in interface Set<String>

contains

public boolean contains(Object o)
Specified by:
contains in interface Collection<String>
Specified by:
contains in interface Set<String>

containsAll

public boolean containsAll(Collection<?> os)
Specified by:
containsAll in interface Collection<String>
Specified by:
containsAll in interface Set<String>

equals

public boolean equals(Object o)
Specified by:
equals in interface Collection<String>
Specified by:
equals in interface Set<String>
Overrides:
equals in class Object

hashCode

public int hashCode()
Specified by:
hashCode in interface Collection<String>
Specified by:
hashCode in interface Set<String>
Overrides:
hashCode in class Object

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection<String>
Specified by:
isEmpty in interface Set<String>

iterator

public Iterator<String> iterator()
Specified by:
iterator in interface Iterable<String>
Specified by:
iterator in interface Collection<String>
Specified by:
iterator in interface Set<String>

remove

public boolean remove(Object o)
Specified by:
remove in interface Collection<String>
Specified by:
remove in interface Set<String>

removeAll

public boolean removeAll(Collection<?> os)
Specified by:
removeAll in interface Collection<String>
Specified by:
removeAll in interface Set<String>

retainAll

public boolean retainAll(Collection<?> os)
Specified by:
retainAll in interface Collection<String>
Specified by:
retainAll in interface Set<String>

size

public int size()
Specified by:
size in interface Collection<String>
Specified by:
size in interface Set<String>

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection<String>
Specified by:
toArray in interface Set<String>

toArray

public <T> T[] toArray(T[] a)
Specified by:
toArray in interface Collection<String>
Specified by:
toArray in interface Set<String>