Package jadex.collection
Class LeaseTimeSet.SynchronizedLeaseTimeCollection<E>
java.lang.Object
jadex.collection.LeaseTimeSet.SynchronizedLeaseTimeCollection<E>
- All Implemented Interfaces:
ILeaseTimeSet<E>,Serializable,Iterable<E>,Collection<E>
- Enclosing class:
LeaseTimeSet<E>
public static class LeaseTimeSet.SynchronizedLeaseTimeCollection<E>
extends Object
implements ILeaseTimeSet<E>, Serializable
Synchronized lease time collection.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanAdd a new entry.booleanaddAll(Collection<? extends E> coll) voidclear()booleanbooleancontainsAll(Collection<?> coll) booleanisEmpty()iterator()booleanbooleanremoveAll(Collection<?> coll) booleanretainAll(Collection<?> coll) voidsetRemoveCommand(Consumer<jadex.common.Tuple2<E, Long>> cmd) Set the remove cmd.intsize()Object[]toArray()<T> T[]toArray(T[] a) toString()voidUpdate the timestamp of e.voidUpdate the timestamp of e.booleanAdd a new entry or update an existing entry.booleanAdd a new entry or update an existing entry.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
Constructor Details
-
SynchronizedLeaseTimeCollection
-
SynchronizedLeaseTimeCollection
-
-
Method Details
-
setRemoveCommand
Set the remove cmd.- Specified by:
setRemoveCommandin interfaceILeaseTimeSet<E>
-
size
public int size()- Specified by:
sizein interfaceCollection<E>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<E>
-
contains
- Specified by:
containsin interfaceCollection<E>
-
toArray
- Specified by:
toArrayin interfaceCollection<E>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArrayin interfaceCollection<E>
-
iterator
-
add
- Specified by:
addin interfaceCollection<E>
-
remove
- Specified by:
removein interfaceCollection<E>
-
containsAll
- Specified by:
containsAllin interfaceCollection<E>
-
addAll
- Specified by:
addAllin interfaceCollection<E>
-
removeAll
- Specified by:
removeAllin interfaceCollection<E>
-
retainAll
- Specified by:
retainAllin interfaceCollection<E>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<E>
-
toString
-
add
Description copied from interface:ILeaseTimeSetAdd a new entry.- Specified by:
addin interfaceILeaseTimeSet<E>- Parameters:
e- The entry.leasetime- The leasetime.- Returns:
- True, if new entry.
-
update
Description copied from interface:ILeaseTimeSetAdd a new entry or update an existing entry.- Specified by:
updatein interfaceILeaseTimeSet<E>- Returns:
- True, if new entry.
-
update
Add a new entry or update an existing entry.- Specified by:
updatein interfaceILeaseTimeSet<E>- Parameters:
entry- The entry.- Returns:
- True, if new entry.
-
touch
Update the timestamp of e.- Specified by:
touchin interfaceILeaseTimeSet<E>- Parameters:
entry- The entry.
-
touch
Update the timestamp of e.- Specified by:
touchin interfaceILeaseTimeSet<E>- Parameters:
entry- The entry.
-