protected abstract static class NQEvictor.ProtectedBuilder<B extends NQEvictor.ProtectedBuilder<B>> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected List<Integer> |
capacities |
static int |
DEFAULT_CAPACITY |
static double |
DEFAULT_LOAD_FACTOR |
protected List<Double> |
loadFactors |
| Modifier | Constructor and Description |
|---|---|
protected |
ProtectedBuilder() |
| Modifier and Type | Method and Description |
|---|---|
B |
addLevel()
Adds a level with the default capacity
DEFAULT_CAPACITY and
load factor DEFAULT_LOAD_FACTOR. |
B |
addLevel(double loadFactor)
Adds a level with the default capacity
DEFAULT_CAPACITY and
the specified load factor. |
B |
addLevel(int capacity)
Adds a level with the specified capacity and the default load factor
DEFAULT_LOAD_FACTOR. |
B |
addLevel(int capacity,
double loadFactor)
Adds a level with the specified capacity and load factor.
|
<E> NQEvictor<E> |
build()
Builds the
NQEvictor with the added levels. |
protected abstract B |
convertThis() |
public static final int DEFAULT_CAPACITY
public static final double DEFAULT_LOAD_FACTOR
public B addLevel(int capacity, double loadFactor) throws IllegalArgumentException
RecencyEvictor.capacity - the capacity of the added levelloadFactor - the load factor of the added levelIllegalArgumentException - When capacity is negative or load factor is not between 0
and 1 inclusive.public B addLevel(int capacity) throws IllegalArgumentException
DEFAULT_LOAD_FACTOR. The arguments have the same meaning as
if the level was a RecencyEvictor.capacity - the capacity of the added levelIllegalArgumentException - When capacity is negative.public B addLevel(double loadFactor) throws IllegalArgumentException
DEFAULT_CAPACITY and
the specified load factor. The arguments have the same meaning as if
the level was a RecencyEvictor.loadFactor - the load factor of the added levelIllegalArgumentException - When load factor is not between 0 and 1 inclusive.public B addLevel()
DEFAULT_CAPACITY and
load factor DEFAULT_LOAD_FACTOR. The arguments have the same
meaning as if the level was a RecencyEvictor.public <E> NQEvictor<E> build()
NQEvictor with the added levels. If none were
added, builds NQEvictor with one level with default capacity
and load factor.E - The type of the elements maintained by the evictor.NQEvictorprotected abstract B convertThis()
Copyright © 2011–2024 Live Ontologies Project. All rights reserved.