Package com.jozufozu.flywheel.light
Class WeakContainmentMultiMap<T>
java.lang.Object
java.util.AbstractCollection<T>
com.jozufozu.flywheel.light.WeakContainmentMultiMap<T>
- All Implemented Interfaces:
Iterable<T>,Collection<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget(long l) it.unimi.dsi.fastutil.longs.LongSetgetAndResetContainment(T listener) This is a confusing function, but it maintains the internal state of the chunk/section maps.iterator()voidbooleanintsize()Methods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toStringMethods 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
-
WeakContainmentMultiMap
public WeakContainmentMultiMap()
-
-
Method Details
-
getAndResetContainment
This is a confusing function, but it maintains the internal state of the chunk/section maps.First, uses the reverse lookup map to remove listener from all sets in the lookup map.
Then, clears the listeners containment set.- Parameters:
listener- The listener to clean up.- Returns:
- An empty set that should be populated with the chunks/sections the listener is contained in.
-
get
-
put
-
remove
- Specified by:
removein interfaceCollection<T>- Overrides:
removein classAbstractCollection<T>
-
iterator
- Specified by:
iteratorin interfaceCollection<T>- Specified by:
iteratorin interfaceIterable<T>- Specified by:
iteratorin classAbstractCollection<T>
-
size
public int size()- Specified by:
sizein interfaceCollection<T>- Specified by:
sizein classAbstractCollection<T>
-