Package com._1c.g5.v8.xmdb.impl
Class ComplexValue
java.lang.Object
com._1c.g5.v8.xmdb.impl.ComplexValue
Value as list of key/value pairs
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionComplexValue
(String key, byte[] value) ComplexValue
(String key, byte[] value, ComplexValue next) -
Method Summary
Modifier and TypeMethodDescriptionstatic ComplexValue
deserialize
(byte[] bytes) Deserialize whole list of ComplexValuesbyte[]
get
(long key) Get value by exact keybyte[]
Get value by exact keygetKey()
Get key of current (first) cv entryint
Calculate list lengthgetNext()
Get next CV entrybyte[]
getValue()
Get value of current (first) cv entryinsert
(long key, byte[] value) Insert new value into list and return ComplexValue with next = new listRemove key/value pair by exact keybyte[]
void
setNext
(ComplexValue next) Set next CV entrytoString()
updateWithRAW
(byte[] raw) Insert values from raw into current ComplexValuesList.
-
Field Details
-
key
-
value
protected byte[] value -
next
-
-
Constructor Details
-
ComplexValue
-
ComplexValue
-
-
Method Details
-
serialize
public byte[] serialize() -
deserialize
Deserialize whole list of ComplexValues- Parameters:
bytes
-
-
get
Get value by exact key- Parameters:
key
-- Returns:
-
get
public byte[] get(long key) Get value by exact key- Parameters:
key
-- Returns:
-
updateWithRAW
Insert values from raw into current ComplexValuesList. Return ComplexValue(key=null, val=null, next=result list)- Parameters:
raw
- complexValue list byte[] representation- Returns:
- ComplexValue where next = result
-
remove
Remove key/value pair by exact key- Parameters:
key
-- Returns:
- ComplexValue with key/value of removed value and next = new head
-
insert
Insert new value into list and return ComplexValue with next = new list- Parameters:
key
-value
-- Returns:
-
insert
-
toString
-
getKey
Get key of current (first) cv entry- Returns:
- the key
-
getValue
public byte[] getValue()Get value of current (first) cv entry- Returns:
- the value
-
getNext
Get next CV entry- Returns:
- the next
-
setNext
Set next CV entry- Parameters:
next
- the next to set
-
getLength
public int getLength()Calculate list length- Returns:
-