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 TypeMethodDescriptionboolean
boolean
Add a new entry.boolean
addAll
(Collection<? extends E> coll) void
clear()
boolean
boolean
containsAll
(Collection<?> coll) boolean
isEmpty()
iterator()
boolean
boolean
removeAll
(Collection<?> coll) boolean
retainAll
(Collection<?> coll) void
setRemoveCommand
(Consumer<jadex.common.Tuple2<E, Long>> cmd) Set the remove cmd.int
size()
Object[]
toArray()
<T> T[]
toArray
(T[] a) toString()
void
Update the timestamp of e.void
Update the timestamp of e.boolean
Add a new entry or update an existing entry.boolean
Add a new entry or update an existing entry.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:
setRemoveCommand
in interfaceILeaseTimeSet<E>
-
size
public int size()- Specified by:
size
in interfaceCollection<E>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection<E>
-
contains
- Specified by:
contains
in interfaceCollection<E>
-
toArray
- Specified by:
toArray
in interfaceCollection<E>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArray
in interfaceCollection<E>
-
iterator
-
add
- Specified by:
add
in interfaceCollection<E>
-
remove
- Specified by:
remove
in interfaceCollection<E>
-
containsAll
- Specified by:
containsAll
in interfaceCollection<E>
-
addAll
- Specified by:
addAll
in interfaceCollection<E>
-
removeAll
- Specified by:
removeAll
in interfaceCollection<E>
-
retainAll
- Specified by:
retainAll
in interfaceCollection<E>
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<E>
-
toString
-
add
Description copied from interface:ILeaseTimeSet
Add a new entry.- Specified by:
add
in interfaceILeaseTimeSet<E>
- Parameters:
e
- The entry.leasetime
- The leasetime.- Returns:
- True, if new entry.
-
update
Description copied from interface:ILeaseTimeSet
Add a new entry or update an existing entry.- Specified by:
update
in interfaceILeaseTimeSet<E>
- Returns:
- True, if new entry.
-
update
Add a new entry or update an existing entry.- Specified by:
update
in interfaceILeaseTimeSet<E>
- Parameters:
entry
- The entry.- Returns:
- True, if new entry.
-
touch
Update the timestamp of e.- Specified by:
touch
in interfaceILeaseTimeSet<E>
- Parameters:
entry
- The entry.
-
touch
Update the timestamp of e.- Specified by:
touch
in interfaceILeaseTimeSet<E>
- Parameters:
entry
- The entry.
-