Package com._1c.g5.v8.xmdb.impl
Class ComplexValue
- java.lang.Object
-
- com._1c.g5.v8.xmdb.impl.ComplexValue
-
public class ComplexValue extends Object
Value as list of key/value pairs
-
-
Field Summary
Fields Modifier and Type Field Description protected String
key
protected ComplexValue
next
protected byte[]
value
-
Constructor Summary
Constructors Constructor Description ComplexValue(String key, byte[] value)
ComplexValue(String key, byte[] value, ComplexValue next)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ComplexValue
deserialize(byte[] bytes)
Deserialize whole list of ComplexValuesbyte[]
get(long key)
Get value by exact keybyte[]
get(String key)
Get value by exact keyString
getKey()
Get key of current (first) cv entryint
getLength()
Calculate list lengthComplexValue
getNext()
Get next CV entrybyte[]
getValue()
Get value of current (first) cv entryComplexValue
insert(long key, byte[] value)
ComplexValue
insert(String key, byte[] value)
Insert new value into list and return ComplexValue with next = new listComplexValue
remove(String key)
Remove key/value pair by exact keybyte[]
serialize()
void
setNext(ComplexValue next)
Set next CV entryString
toString()
ComplexValue
updateWithRAW(byte[] raw)
Insert values from raw into current ComplexValuesList.
-
-
-
Field Detail
-
key
protected String key
-
value
protected byte[] value
-
next
protected ComplexValue next
-
-
Constructor Detail
-
ComplexValue
public ComplexValue(String key, byte[] value)
-
ComplexValue
public ComplexValue(String key, byte[] value, ComplexValue next)
-
-
Method Detail
-
serialize
public byte[] serialize()
-
deserialize
public static ComplexValue deserialize(byte[] bytes)
Deserialize whole list of ComplexValues- Parameters:
bytes
-
-
get
public byte[] get(String key)
Get value by exact key- Parameters:
key
-- Returns:
-
get
public byte[] get(long key)
Get value by exact key- Parameters:
key
-- Returns:
-
updateWithRAW
public ComplexValue updateWithRAW(byte[] raw)
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
public ComplexValue remove(String key)
Remove key/value pair by exact key- Parameters:
key
-- Returns:
- ComplexValue with key/value of removed value and next = new head
-
insert
public ComplexValue insert(String key, byte[] value)
Insert new value into list and return ComplexValue with next = new list- Parameters:
key
-value
-- Returns:
-
insert
public ComplexValue insert(long key, byte[] value)
-
getKey
public String 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
public ComplexValue getNext()
Get next CV entry- Returns:
- the next
-
setNext
public void setNext(ComplexValue next)
Set next CV entry- Parameters:
next
- the next to set
-
getLength
public int getLength()
Calculate list length- Returns:
-
-