public enum IntTypeOps extends Enum<IntTypeOps> implements PrimitiveIdTypeOps<org.apache.hadoop.io.IntWritable>, NumericTypeOps<org.apache.hadoop.io.IntWritable>
Enum Constant and Description |
---|
INSTANCE
Singleton instance
|
Modifier and Type | Method and Description |
---|---|
int |
compare(org.apache.hadoop.io.IntWritable value1,
org.apache.hadoop.io.IntWritable value2)
Compare two values
|
org.apache.hadoop.io.IntWritable |
create()
Create new instance of type T.
|
<V> Basic2ObjectMap.BasicInt2ObjectOpenHashMap<V> |
create2ObjectOpenHashMap(int capacity,
WritableWriter<V> valueWriter)
Create Basic2ObjectMap with key type T, given capacity.
|
<V> Basic2ObjectMap.BasicInt2ObjectOpenHashMap<V> |
create2ObjectOpenHashMap(WritableWriter<V> valueWriter)
Create Basic2ObjectMap with key type T.
|
WIntArrayList |
createArrayList()
Create WArrayList of type T.
|
WIntArrayList |
createArrayList(int capacity)
Create WArrayList of type T, given capacity.
|
org.apache.hadoop.io.IntWritable |
createCopy(org.apache.hadoop.io.IntWritable from)
Create a copy of passed object
|
org.apache.hadoop.io.IntWritable |
createMaxPositiveValue()
Maximal positive value representable via current type.
|
org.apache.hadoop.io.IntWritable |
createMinNegativeValue()
Minimal negative value representable via current type.
|
org.apache.hadoop.io.IntWritable |
createOne()
Value of one
|
BasicSet.BasicIntOpenHashSet |
createOpenHashSet()
Create BasicSet of type T.
|
BasicSet.BasicIntOpenHashSet |
createOpenHashSet(long capacity)
Create BasicSet of type T, given capacity.
|
org.apache.hadoop.io.IntWritable |
createZero()
Value of zero
|
Class<org.apache.hadoop.io.IntWritable> |
getTypeClass()
Class object for generic type T.
|
void |
multiplyInto(org.apache.hadoop.io.IntWritable value,
org.apache.hadoop.io.IntWritable multiplier)
value*=multiplier
|
void |
negate(org.apache.hadoop.io.IntWritable value)
-value
|
void |
plusInto(org.apache.hadoop.io.IntWritable value,
org.apache.hadoop.io.IntWritable increment)
value+=adder
|
WIntArrayList |
readNewArrayList(DataInput in)
Create WArrayList of type T by reading it from given input.
|
void |
set(org.apache.hadoop.io.IntWritable to,
org.apache.hadoop.io.IntWritable from)
Copies the value from the second argument into the first.
|
static IntTypeOps |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static IntTypeOps[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final IntTypeOps INSTANCE
public static IntTypeOps[] values()
for (IntTypeOps c : IntTypeOps.values()) System.out.println(c);
public static IntTypeOps valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic Class<org.apache.hadoop.io.IntWritable> getTypeClass()
TypeOps
getTypeClass
in interface TypeOps<org.apache.hadoop.io.IntWritable>
public org.apache.hadoop.io.IntWritable create()
TypeOps
public org.apache.hadoop.io.IntWritable createCopy(org.apache.hadoop.io.IntWritable from)
TypeOps
createCopy
in interface TypeOps<org.apache.hadoop.io.IntWritable>
from
- Object to copypublic void set(org.apache.hadoop.io.IntWritable to, org.apache.hadoop.io.IntWritable from)
TypeOps
public WIntArrayList createArrayList()
PrimitiveTypeOps
createArrayList
in interface PrimitiveTypeOps<org.apache.hadoop.io.IntWritable>
public WIntArrayList createArrayList(int capacity)
PrimitiveTypeOps
createArrayList
in interface PrimitiveTypeOps<org.apache.hadoop.io.IntWritable>
capacity
- Capacitypublic WIntArrayList readNewArrayList(DataInput in) throws IOException
PrimitiveTypeOps
readNewArrayList
in interface PrimitiveTypeOps<org.apache.hadoop.io.IntWritable>
in
- InputIOException
public BasicSet.BasicIntOpenHashSet createOpenHashSet()
PrimitiveIdTypeOps
createOpenHashSet
in interface PrimitiveIdTypeOps<org.apache.hadoop.io.IntWritable>
public BasicSet.BasicIntOpenHashSet createOpenHashSet(long capacity)
PrimitiveIdTypeOps
createOpenHashSet
in interface PrimitiveIdTypeOps<org.apache.hadoop.io.IntWritable>
capacity
- Capacitypublic <V> Basic2ObjectMap.BasicInt2ObjectOpenHashMap<V> create2ObjectOpenHashMap(WritableWriter<V> valueWriter)
PrimitiveIdTypeOps
create2ObjectOpenHashMap
in interface PrimitiveIdTypeOps<org.apache.hadoop.io.IntWritable>
V
- Type of values in the mapvalueWriter
- Writer of valuespublic <V> Basic2ObjectMap.BasicInt2ObjectOpenHashMap<V> create2ObjectOpenHashMap(int capacity, WritableWriter<V> valueWriter)
PrimitiveIdTypeOps
create2ObjectOpenHashMap
in interface PrimitiveIdTypeOps<org.apache.hadoop.io.IntWritable>
V
- Type of values in the mapcapacity
- CapacityvalueWriter
- Writer of valuespublic org.apache.hadoop.io.IntWritable createZero()
NumericTypeOps
createZero
in interface NumericTypeOps<org.apache.hadoop.io.IntWritable>
public org.apache.hadoop.io.IntWritable createOne()
NumericTypeOps
createOne
in interface NumericTypeOps<org.apache.hadoop.io.IntWritable>
public org.apache.hadoop.io.IntWritable createMinNegativeValue()
NumericTypeOps
createMinNegativeValue
in interface NumericTypeOps<org.apache.hadoop.io.IntWritable>
public org.apache.hadoop.io.IntWritable createMaxPositiveValue()
NumericTypeOps
createMaxPositiveValue
in interface NumericTypeOps<org.apache.hadoop.io.IntWritable>
public void plusInto(org.apache.hadoop.io.IntWritable value, org.apache.hadoop.io.IntWritable increment)
NumericTypeOps
plusInto
in interface NumericTypeOps<org.apache.hadoop.io.IntWritable>
value
- Value to modifyincrement
- Incrementpublic void multiplyInto(org.apache.hadoop.io.IntWritable value, org.apache.hadoop.io.IntWritable multiplier)
NumericTypeOps
multiplyInto
in interface NumericTypeOps<org.apache.hadoop.io.IntWritable>
value
- Value to modifymultiplier
- Multiplierpublic void negate(org.apache.hadoop.io.IntWritable value)
NumericTypeOps
negate
in interface NumericTypeOps<org.apache.hadoop.io.IntWritable>
value
- Value to negatepublic int compare(org.apache.hadoop.io.IntWritable value1, org.apache.hadoop.io.IntWritable value2)
NumericTypeOps
compare
in interface NumericTypeOps<org.apache.hadoop.io.IntWritable>
value1
- First valuevalue2
- Second valueCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.