T
- Element typepublic interface BasicSet<T>
extends org.apache.hadoop.io.Writable
Modifier and Type | Interface and Description |
---|---|
static class |
BasicSet.BasicIntOpenHashSet
IntWritable implementation of BasicSet
|
static class |
BasicSet.BasicLongOpenHashSet
LongWritable implementation of BasicSet
|
Modifier and Type | Field and Description |
---|---|
static long |
MAX_OPEN_HASHSET_CAPACITY
Threshold for using OpenHashSet and OpenHashBigSet implementations.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(T value)
Adds value to the set.
|
void |
clear()
Removes all of the elements from this list.
|
boolean |
contains(T value)
Checks whether set contains given value
|
PrimitiveIdTypeOps<T> |
getElementTypeOps()
TypeOps for type of elements this object holds
|
long |
size()
Number of elements in this list
|
void |
trim(long n)
Makes sure set is not using space with capacity more than
max(n,size()) entries.
|
static final long MAX_OPEN_HASHSET_CAPACITY
void clear()
long size()
void trim(long n)
n
- the threshold for the trimming.boolean add(T value)
value
- Value to addboolean contains(T value)
value
- Value to checkPrimitiveIdTypeOps<T> getElementTypeOps()
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.