Package it.unimi.di.big.mg4j.document
Class WikipediaDocumentSequence.SignedRedirectedStringMap
- java.lang.Object
-
- it.unimi.dsi.fastutil.objects.AbstractObject2LongFunction<CharSequence>
-
- it.unimi.di.big.mg4j.document.WikipediaDocumentSequence.SignedRedirectedStringMap
-
- All Implemented Interfaces:
StringMap<CharSequence>
,Function<CharSequence,Long>
,Object2LongFunction<CharSequence>
,Size64
,Serializable
,Function<CharSequence,Long>
,ToLongFunction<CharSequence>
- Enclosing class:
- WikipediaDocumentSequence
public static final class WikipediaDocumentSequence.SignedRedirectedStringMap extends AbstractObject2LongFunction<CharSequence> implements StringMap<CharSequence>
A wrapper around a signed function that remaps entries exceeding a provided threshold using a specified target array.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class it.unimi.dsi.fastutil.objects.AbstractObject2LongFunction
defRetValue
-
-
Constructor Summary
Constructors Constructor Description SignedRedirectedStringMap(long numberOfDocuments, Object2LongFunction<CharSequence> signedFunction, long[] target)
Creates a new signed redirected map.
-
Method Summary
Modifier and Type Method Description boolean
containsKey(Object key)
long
getLong(Object key)
ObjectBigList<? extends CharSequence>
list()
int
size()
Deprecated.long
size64()
-
Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObject2LongFunction
defaultReturnValue, defaultReturnValue
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface it.unimi.dsi.fastutil.objects.Object2LongFunction
applyAsLong, defaultReturnValue, defaultReturnValue, get, put, put, remove, removeLong
-
-
-
-
Constructor Detail
-
SignedRedirectedStringMap
public SignedRedirectedStringMap(long numberOfDocuments, Object2LongFunction<CharSequence> signedFunction, long[] target)
Creates a new signed redirected map.- Parameters:
numberOfDocuments
- the threshold after which thetarget
array will be used to compute the output.signedFunction
- the base signed function.target
- an array providing the output for items beyondnumberOfDocuments
; it must be long as the size ofsignedFunction
minusnumberOfDocuments
.
-
-
Method Detail
-
getLong
public long getLong(Object key)
- Specified by:
getLong
in interfaceObject2LongFunction<CharSequence>
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interfaceFunction<CharSequence,Long>
-
size64
public long size64()
- Specified by:
size64
in interfaceSize64
- Specified by:
size64
in interfaceStringMap<CharSequence>
-
size
@Deprecated public int size()
Deprecated.- Specified by:
size
in interfaceFunction<CharSequence,Long>
- Specified by:
size
in interfaceSize64
- Specified by:
size
in interfaceStringMap<CharSequence>
-
list
public ObjectBigList<? extends CharSequence> list()
- Specified by:
list
in interfaceStringMap<CharSequence>
-
-