Package org.freedesktop.dbus.connections
Class PeerSet
- java.lang.Object
-
- org.freedesktop.dbus.connections.PeerSet
-
- All Implemented Interfaces:
Iterable<String>,Collection<String>,Set<String>,DBusSigHandler<DBus.NameOwnerChanged>
public class 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
Constructors Constructor Description PeerSet(DBusConnection _connection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(String address)booleanaddAll(Collection<? extends String> _addresses)voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> os)booleanequals(Object o)voidhandle(DBus.NameOwnerChanged noc)Handle a signal.inthashCode()booleanisEmpty()Iterator<String>iterator()booleanremove(Object o)booleanremoveAll(Collection<?> os)booleanretainAll(Collection<?> os)intsize()Object[]toArray()<T> T[]toArray(T[] a)-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.Set
spliterator
-
-
-
-
Constructor Detail
-
PeerSet
public PeerSet(DBusConnection _connection)
-
-
Method Detail
-
handle
public void handle(DBus.NameOwnerChanged noc)
Description copied from interface:DBusSigHandlerHandle a signal.- Specified by:
handlein interfaceDBusSigHandler<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)
-
addAll
public boolean addAll(Collection<? extends String> _addresses)
-
clear
public void clear()
-
contains
public boolean contains(Object o)
-
containsAll
public boolean containsAll(Collection<?> os)
- Specified by:
containsAllin interfaceCollection<String>- Specified by:
containsAllin interfaceSet<String>
-
equals
public boolean equals(Object o)
-
hashCode
public int hashCode()
-
isEmpty
public boolean isEmpty()
-
remove
public boolean remove(Object o)
-
removeAll
public boolean removeAll(Collection<?> os)
-
retainAll
public boolean retainAll(Collection<?> os)
-
size
public int size()
-
toArray
public Object[] toArray()
-
-