public class EncodableInteger extends Object implements Encodable, Serializable
Modifier and Type | Class and Description |
---|---|
static class |
EncodableInteger.Factory |
Modifier and Type | Field and Description |
---|---|
private int |
value |
BOOLEAN_ENCODED_SIZE, BYTE_ENCODED_SIZE, DOUBLE_ENCODED_SIZE, FLOAT_ENCODED_SIZE, INT_ENCODED_SIZE, LONG_ENCODED_SIZE, SHORT_ENCODED_SIZE
Constructor and Description |
---|
EncodableInteger() |
Modifier and Type | Method and Description |
---|---|
void |
decode(Decoder decoder)
Decodes the content of this object
|
void |
encode(Encoder encoder)
Encodes the content of this object
|
int |
getAndIncrement() |
int |
getEncodableClassId()
Returns a unique class identifier.
|
int |
getEncodedSize()
Returns the size of the byte array that results
from the encoding of this object.
|
int |
getValue() |
int |
incrementAndGet() |
void |
setValue(int value) |
String |
toString() |
public int getValue()
public void setValue(int value)
public int incrementAndGet()
public int getAndIncrement()
public int getEncodableClassId()
Encodable
getEncodableClassId
in interface Encodable
public int getEncodedSize() throws Exception
Encodable
getEncodedSize
in interface Encodable
Exception
- if an error occurspublic void encode(Encoder encoder) throws Exception
Encodable
public void decode(Decoder decoder) throws Exception
Encodable
Copyright © 2019 ScalAgent D.T.. All rights reserved.