Class WeigthedSelectorFailover<T>
java.lang.Object
org.aksw.commons.collections.selector.WeigthedSelectorFailover<T>
- Type Parameters:
T-
- All Implemented Interfaces:
Cloneable, WeightedSelector<T>
This class is intended for cases where the primary selector draws with replacement.
Once the primary selector is consumed, the failover is consulted.
- Author:
- Claus Stadler, Oct 12, 2018
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionWeigthedSelectorFailover(WeightedSelector<T> primary, WeightedSelector<T> failover) -
Method Summary
Methods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface WeightedSelector
entryMap, sample
-
Field Details
-
-
failover
-
-
Constructor Details
-
WeigthedSelectorFailover
-
-
Method Details
-
clone
Description copied from interface:WeightedSelectorCloning mechanism to allow simple implementation of backtracking.- Specified by:
clonein interfaceWeightedSelector<T>- Overrides:
clonein classObject- Returns:
-
sampleEntry
- Specified by:
sampleEntryin interfaceWeightedSelector<T>
-
entries
- Specified by:
entriesin interfaceWeightedSelector<T>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceWeightedSelector<T>
-