Class AbstractOffsetMap<K extends org.opendaylight.yangtools.concepts.Immutable & Comparable<K>,T extends AbstractOffsetMap<K,T>>
java.lang.Object
org.opendaylight.protocol.bgp.mode.impl.AbstractOffsetMap<K,T>
@Beta
public abstract class AbstractOffsetMap<K extends org.opendaylight.yangtools.concepts.Immutable & Comparable<K>,T extends AbstractOffsetMap<K,T>>
extends Object
A map maintaining a set of values in an external array corresponding to a set of keys. This class is expected to be
used as a template, i.e. users subclass it to a concrete map and use exclusively that class to access the
functionality.
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractOffsetMap
(K[] emptyKeys, Comparator<K> comparator, com.google.common.collect.ImmutableSet<K> routerIds) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Comparator<K>
protected abstract K[]
final <C> C[]
final K
getKey
(int offset) final <C> C
getValue
(C[] array, int offset) protected abstract T
instanceForKeys
(com.google.common.collect.ImmutableSet<K> newKeys) final boolean
isEmpty()
final int
final <C> C[]
removeValue
(C[] oldArray, int offset, C[] emptyArray) final <C> void
setValue
(C[] array, int offset, C value) final int
size()
final T
final T
-
Constructor Details
-
AbstractOffsetMap
protected AbstractOffsetMap(K[] emptyKeys, Comparator<K> comparator, com.google.common.collect.ImmutableSet<K> routerIds)
-
-
Method Details
-
getKey
-
offsetOf
-
isEmpty
public final boolean isEmpty() -
size
public final int size() -
with
-
without
-
getValue
public final <C> C getValue(C[] array, int offset) -
setValue
public final <C> void setValue(C[] array, int offset, C value) -
expand
-
removeValue
public final <C> C[] removeValue(C[] oldArray, int offset, C[] emptyArray) -
comparator
-
emptyKeys
-
instanceForKeys
-