|
Parsing Engine | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdanbikel.util.AbstractMapToPrimitive.Entry<K>
public abstract static class AbstractMapToPrimitive.Entry<K>
Provides convenient abstract implementation of the
MapToPrimitive.Entry
interface: all primitive-specific
methods are implemented to throw an
UnsupportedOperationException
. In this way, a concrete
subclass need only implement methods specific to the primitives it
supports.
Field Summary | |
---|---|
protected K |
key
The key of this map entry. |
Constructor Summary | |
---|---|
AbstractMapToPrimitive.Entry()
|
Method Summary | |
---|---|
void |
add(byte addend)
Increments the byte at index 0 by the specified amount. |
void |
add(double addend)
Increments the double at index 0 by the specified amount. |
void |
add(float addend)
Increments the float at index 0 by the specified amount. |
void |
add(int addend)
Increments the int at index 0 by the specified amount. |
void |
add(int index,
byte addend)
Increments the byte at the specified index by the specified
amount. |
void |
add(int index,
double addend)
Increments the double at the specified index by the specified
amount. |
void |
add(int index,
float addend)
Increments the float at the specified index by the specified
amount. |
void |
add(int index,
int addend)
Increments the int at the specified index by the specified
amount. |
void |
add(int index,
long addend)
Increments the long at the specified index by the specified
amount. |
void |
add(int index,
short addend)
Increments the short at the specified index by the specified
amount. |
void |
add(long addend)
Increments the long at index 0 by the specified amount. |
void |
add(short addend)
Increments the short at index 0 by the specified amount. |
byte |
getByteValue()
Gets the byte value associated with the key contained in
this entry. |
byte |
getByteValue(int index)
Returns the byte value of the specified index associated
with the key in this map entry. |
char |
getCharValue()
Gets the char value associated with the key contained in
this entry. |
char |
getCharValue(int index)
Returns the char value of the specified index associated
with the key in this map entry. |
double |
getDoubleValue()
Gets the double value associated with the key contained in
this entry. |
double |
getDoubleValue(int index)
Returns the double value of the specified index associated
with the key in this map entry. |
float |
getFloatValue()
Gets the float value associated with the key contained in
this entry. |
float |
getFloatValue(int index)
Returns the float value of the specified index associated
with the key in this map entry. |
int |
getIntValue()
Gets the int value associated with the key contained in
this entry. |
int |
getIntValue(int index)
Returns the int value of the specified index associated
with the key in this map entry. |
K |
getKey()
|
long |
getLongValue()
Gets the long value associated with the key contained in
this entry. |
long |
getLongValue(int index)
Returns the long value of the specified index associated
with the key in this map entry. |
short |
getShortValue()
Gets the short value associated with the key contained in
this entry. |
short |
getShortValue(int index)
Returns the short value of the specified index associated
with the key in this map entry. |
int |
numBytes()
Returns 0. |
int |
numChars()
Returns 0. |
int |
numDoubles()
Returns 0. |
int |
numFloats()
Returns 0. |
int |
numInts()
Returns 0. |
int |
numLongs()
Returns 0. |
int |
numShorts()
Returns 0. |
byte |
set(int index,
byte value)
Sets the char value for the key in this entry to be
the specified character. |
char |
set(int index,
char value)
Sets the char value for the key in this entry to be
the specified character. |
double |
set(int index,
double value)
Sets the char value for the key in this entry to be
the specified character. |
float |
set(int index,
float value)
Sets the float value for the key in this entry to be
the specified character. |
int |
set(int index,
int value)
Sets the char value for the key in this entry to be
the specified character. |
long |
set(int index,
long value)
Sets the char value for the key in this entry to be
the specified character. |
short |
set(int index,
short value)
Sets the short value for the key in this entry to be
the specified character. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface danbikel.util.MapToPrimitive.Entry |
---|
replaceKey |
Methods inherited from interface java.util.Map.Entry |
---|
equals, getValue, hashCode, setValue |
Field Detail |
---|
protected transient K key
Constructor Detail |
---|
public AbstractMapToPrimitive.Entry()
Method Detail |
---|
public K getKey()
getKey
in interface Map.Entry<K,Object>
public int numBytes()
numBytes
in interface MapToPrimitive.Entry<K>
public byte getByteValue()
byte
value associated with the key contained in
this entry. If an implementor associates multiple byte
values, this method retrieves the first one.
getByteValue
in interface MapToPrimitive.Entry<K>
UnsupportedOperationException
- if the implementor does not
associate byte
s with its keyspublic byte getByteValue(int index)
byte
value of the specified index associated
with the key in this map entry. If the implementor associates only
a single byte
with its key, then the specified index must
be 0
.
getByteValue
in interface MapToPrimitive.Entry<K>
index
- the index of the byte
value to retrieve
IllegalArgumentException
- if
0 <= index < numBytes()is
false
UnsupportedOperationException
- if the implementor does not
associate byte
s with its keypublic int numShorts()
numShorts
in interface MapToPrimitive.Entry<K>
public short getShortValue()
short
value associated with the key contained in
this entry. If an implementor associates multiple short
values, this method retrieves the first one.
getShortValue
in interface MapToPrimitive.Entry<K>
UnsupportedOperationException
- if the implementor does not
associate short
s with its keyspublic short getShortValue(int index)
short
value of the specified index associated
with the key in this map entry. If the implementor associates only
a single short
with its key, then the specified index must
be 0
.
getShortValue
in interface MapToPrimitive.Entry<K>
index
- the index of the short
value to retrieve
IllegalArgumentException
- if
0 <= index < numShorts()is
false
UnsupportedOperationException
- if the implementor does not
associate short
s with its keypublic int numChars()
numChars
in interface MapToPrimitive.Entry<K>
public char getCharValue()
char
value associated with the key contained in
this entry. If an implementor associates multiple char
values, this method retrieves the first one.
getCharValue
in interface MapToPrimitive.Entry<K>
UnsupportedOperationException
- if the implementor does not
associate char
s with its keyspublic char getCharValue(int index)
char
value of the specified index associated
with the key in this map entry. If the implementor associates only
a single char
with its key, then the specified index must
be 0
.
getCharValue
in interface MapToPrimitive.Entry<K>
index
- the index of the char
value to retrieve
IllegalArgumentException
- if
0 <= index < numChars()is
false
UnsupportedOperationException
- if the implementor does not
associate char
s with its keypublic int numInts()
numInts
in interface MapToPrimitive.Entry<K>
public int getIntValue()
int
value associated with the key contained in
this entry. If an implementor associates multiple int
values, this method retrieves the first one.
getIntValue
in interface MapToPrimitive.Entry<K>
UnsupportedOperationException
- if the implementor does not
associate int
s with its keyspublic int getIntValue(int index)
int
value of the specified index associated
with the key in this map entry. If the implementor associates only
a single int
with its key, then the specified index must
be 0
.
getIntValue
in interface MapToPrimitive.Entry<K>
index
- the index of the int
value to retrieve
IllegalArgumentException
- if
0 <= index < numInts()is
false
UnsupportedOperationException
- if the implementor does not
associate int
s with its keypublic int numLongs()
numLongs
in interface MapToPrimitive.Entry<K>
public long getLongValue()
long
value associated with the key contained in
this entry. If an implementor associates multiple long
values, this method retrieves the first one.
getLongValue
in interface MapToPrimitive.Entry<K>
UnsupportedOperationException
- if the implementor does not
associate long
s with its keyspublic long getLongValue(int index)
long
value of the specified index associated
with the key in this map entry. If the implementor associates only
a single long
with its key, then the specified index must
be 0
.
getLongValue
in interface MapToPrimitive.Entry<K>
index
- the index of the long
value to retrieve
IllegalArgumentException
- if
0 <= index < numLongs()is
false
UnsupportedOperationException
- if the implementor does not
associate long
s with its keypublic int numFloats()
numFloats
in interface MapToPrimitive.Entry<K>
public float getFloatValue()
float
value associated with the key contained in
this entry. If an implementor associates multiple float
values, this method retrieves the first one.
getFloatValue
in interface MapToPrimitive.Entry<K>
UnsupportedOperationException
- if the implementor does not
associate float
s with its keyspublic float getFloatValue(int index)
float
value of the specified index associated
with the key in this map entry. If the implementor associates only
a single float
with its key, then the specified index must
be 0
.
getFloatValue
in interface MapToPrimitive.Entry<K>
index
- the index of the float
value to retrieve
IllegalArgumentException
- if
0 <= index < numFloats()is
false
UnsupportedOperationException
- if the implementor does not
associate float
s with its keypublic int numDoubles()
numDoubles
in interface MapToPrimitive.Entry<K>
public double getDoubleValue()
double
value associated with the key contained in
this entry. If an implementor associates multiple double
values, this method retrieves the first one.
getDoubleValue
in interface MapToPrimitive.Entry<K>
UnsupportedOperationException
- if the implementor does not
associate double
s with its keyspublic double getDoubleValue(int index)
double
value of the specified index associated
with the key in this map entry. If the implementor associates only
a single double
with its key, then the specified index must
be 0
.
getDoubleValue
in interface MapToPrimitive.Entry<K>
index
- the index of the double
value to retrieve
IllegalArgumentException
- if
0 <= index < numDoubles()is
false
UnsupportedOperationException
- if the implementor does not
associate double
s with its keypublic byte set(int index, byte value)
char
value for the key in this entry to be
the specified character.
set
in interface MapToPrimitive.Entry<K>
index
- the index of the character value to setvalue
- the byte to which to set as a value for the key of
this map entry
UnsupportedOperationException
- if the implementor does not
associate byte
s with its keypublic void add(byte addend)
MapToPrimitive.Entry
byte
at index 0 by the specified amount.
This is simply a convenience method, completely equivalent to calling
add(0, addend)
.
add
in interface MapToPrimitive.Entry<K>
addend
- the amount by which to increment the byte
value at the specified indexpublic void add(int index, byte addend)
MapToPrimitive.Entry
byte
at the specified index by the specified
amount.
add
in interface MapToPrimitive.Entry<K>
index
- the index of the byte
value to be incrementedaddend
- the amount by which to increment the byte
value at the specified indexpublic char set(int index, char value)
char
value for the key in this entry to be
the specified character.
set
in interface MapToPrimitive.Entry<K>
index
- the index of the character value to setvalue
- the character to set as a value for the key of
this map entry
UnsupportedOperationException
- if the implementor does not
associate char
s with its keypublic short set(int index, short value)
short
value for the key in this entry to be
the specified character.
set
in interface MapToPrimitive.Entry<K>
index
- the index of the character value to setvalue
- the short to set as a value for the key of
this map entry
UnsupportedOperationException
- if the implementor does not
associate short
s with its keypublic void add(short addend)
MapToPrimitive.Entry
short
at index 0 by the specified amount.
This is simply a convenience method, completely equivalent to calling
add(0, addend)
.
add
in interface MapToPrimitive.Entry<K>
addend
- the amount by which to increment the short
value at the specified indexpublic void add(int index, short addend)
MapToPrimitive.Entry
short
at the specified index by the specified
amount.
add
in interface MapToPrimitive.Entry<K>
index
- the index of the short
value to be incrementedaddend
- the amount by which to increment the short
value at the specified indexpublic int set(int index, int value)
char
value for the key in this entry to be
the specified character.
set
in interface MapToPrimitive.Entry<K>
index
- the index of the character value to setvalue
- the character to set as a value for the key of
this map entry
UnsupportedOperationException
- if the implementor does not
associate int
s with its keypublic void add(int addend)
int
at index 0 by the specified amount.
This is simply a convenience method, completely equivalent to calling
add(0, addend)
.
add
in interface MapToPrimitive.Entry<K>
addend
- the amount by which to increment the int
value at the specified indexpublic void add(int index, int addend)
int
at the specified index by the specified
amount.
add
in interface MapToPrimitive.Entry<K>
index
- the index of the int
value to be incrementedaddend
- the amount by which to increment the int
value at the specified indexpublic long set(int index, long value)
char
value for the key in this entry to be
the specified character.
set
in interface MapToPrimitive.Entry<K>
index
- the index of the character value to setvalue
- the long to set as a value for the key of
this map entry
UnsupportedOperationException
- if the implementor does not
associate long
s with its keypublic void add(long addend)
MapToPrimitive.Entry
long
at index 0 by the specified amount.
This is simply a convenience method, completely equivalent to calling
add(0, addend)
.
add
in interface MapToPrimitive.Entry<K>
addend
- the amount by which to increment the long
value at the specified indexpublic void add(int index, long addend)
MapToPrimitive.Entry
long
at the specified index by the specified
amount.
add
in interface MapToPrimitive.Entry<K>
index
- the index of the long
value to be incrementedaddend
- the amount by which to increment the long
value at the specified indexpublic float set(int index, float value)
float
value for the key in this entry to be
the specified character.
set
in interface MapToPrimitive.Entry<K>
index
- the index of the character value to setvalue
- the float to set as a value for the key of
this map entry
UnsupportedOperationException
- if the implementor does not
associate float
s with its keypublic void add(float addend)
MapToPrimitive.Entry
float
at index 0 by the specified amount.
This is simply a convenience method, completely equivalent to calling
add(0, addend)
.
add
in interface MapToPrimitive.Entry<K>
addend
- the amount by which to increment the float
value at the specified indexpublic void add(int index, float addend)
MapToPrimitive.Entry
float
at the specified index by the specified
amount.
add
in interface MapToPrimitive.Entry<K>
index
- the index of the float
value to be incrementedaddend
- the amount by which to increment the float
value at the specified indexpublic double set(int index, double value)
char
value for the key in this entry to be
the specified character.
set
in interface MapToPrimitive.Entry<K>
index
- the index of the character value to setvalue
- the double to set as a value for the key of
this map entry
UnsupportedOperationException
- if the implementor does not
associate double
s with its keypublic void add(double addend)
MapToPrimitive.Entry
double
at index 0 by the specified amount.
This is simply a convenience method, completely equivalent to calling
add(0, addend)
.
add
in interface MapToPrimitive.Entry<K>
addend
- the amount by which to increment the double
value at the specified indexpublic void add(int index, double addend)
MapToPrimitive.Entry
double
at the specified index by the specified
amount.
add
in interface MapToPrimitive.Entry<K>
index
- the index of the double
value to be incrementedaddend
- the amount by which to increment the double
value at the specified index
|
Parsing Engine | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |