|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.simantics.databoard.accessor.binary.BinaryObject
org.simantics.databoard.accessor.binary.BinaryArray
public class BinaryArray
Binary Array is accessor to a byte backed array of elements.
Note, To increase the random access performance of the record, create sub-accessors of its fields.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.simantics.databoard.accessor.Accessor |
---|
Accessor.Listener |
Constructor Summary | |
---|---|
BinaryArray(BinaryObject parent,
Blob blob,
Datatype type,
AccessorParams params)
|
Method Summary | ||
---|---|---|
void |
add(Binding binding,
java.lang.Object value)
Add a new value. |
|
void |
add(int index,
Binding binding,
java.lang.Object value)
Insert a new value. |
|
void |
addAll(Binding binding,
java.lang.Object[] values)
Add an array of elements. |
|
void |
addAll(int index,
Binding binding,
java.lang.Object[] values)
Add an array of elements. |
|
void |
addAllNoflush(Binding binding,
java.lang.Object[] values)
Add an array of elements. |
|
void |
addAllNoflush(int index,
Binding rcb,
java.lang.Object[] rcvs)
Add an array of elements. |
|
void |
addNoflush(Binding binding,
java.lang.Object value)
Add a new value. |
|
void |
addNoflush(int index,
Binding rcb,
java.lang.Object rcv)
Insert a new value. |
|
java.lang.Object |
get(int index,
Binding valueBinding)
Get a element |
|
void |
get(int index,
Binding valueBinding,
java.lang.Object dst)
Read a element |
|
|
getAccessor(int index)
Get an accessor to an element. |
|
void |
getAll(Binding valueBinding,
java.util.Collection<java.lang.Object> values)
Get all elements |
|
void |
getAll(Binding valueBinding,
java.lang.Object[] array)
Get all elements and place them to an array . |
|
|
getComponent(ChildReference reference)
Open an accessor to a child. |
|
void |
remove(int index,
int count)
Remove an element at an index. |
|
void |
removeNoflush(int index,
int count)
Remove an element at an index. |
|
void |
set(int index,
Binding binding,
java.lang.Object value)
Replace a value container with a new value. |
|
void |
setNoflush(int index,
Binding rcb,
java.lang.Object rcv)
Replace a value container with a new value. |
|
void |
setSize(int newSize)
|
|
void |
setSizeNoflush(int newSize)
Set new array size |
|
void |
setValueNoflush(Binding arrayBinding,
java.lang.Object newArray)
Set all values |
|
int |
size()
Return the number of elements in the array. |
|
ArrayType |
type()
Get structural represtentation of the accessor presented in databoard's type system. |
Methods inherited from class org.simantics.databoard.accessor.binary.BinaryObject |
---|
addListener, apply, close, createAccessor, file, flush, getBinary, getParams, getReadLock, getSource, getValue, getValue, getWriteLock, removeListener, setValue, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.simantics.databoard.accessor.ArrayAccessor |
---|
setValue |
Methods inherited from interface org.simantics.databoard.accessor.file.FileAccessor |
---|
close, file, flush |
Methods inherited from interface org.simantics.databoard.accessor.Accessor |
---|
addListener, apply, getValue, getValue, removeListener |
Constructor Detail |
---|
public BinaryArray(BinaryObject parent, Blob blob, Datatype type, AccessorParams params)
Method Detail |
---|
public ArrayType type()
Accessor
type
in interface Accessor
type
in interface ArrayAccessor
type
in class BinaryObject
public void setNoflush(int index, Binding rcb, java.lang.Object rcv) throws AccessorException
FileArrayAccessor
setNoflush
in interface FileArrayAccessor
AccessorException
public void setValueNoflush(Binding arrayBinding, java.lang.Object newArray) throws AccessorException
setValueNoflush
in interface FileAccessor
setValueNoflush
in interface FileArrayAccessor
setValueNoflush
in class BinaryObject
arrayBinding
- newArray
-
AccessorException
public void addNoflush(int index, Binding rcb, java.lang.Object rcv) throws AccessorException
FileArrayAccessor
addNoflush
in interface FileArrayAccessor
index
- position to insert new value torcv
- value
AccessorException
public void addNoflush(Binding binding, java.lang.Object value) throws AccessorException
FileArrayAccessor
addNoflush
in interface FileArrayAccessor
value
- value
AccessorException
public void addAllNoflush(Binding binding, java.lang.Object[] values) throws AccessorException
FileArrayAccessor
addAllNoflush
in interface FileArrayAccessor
values
- value
AccessorException
public void addAllNoflush(int index, Binding rcb, java.lang.Object[] rcvs) throws AccessorException
FileArrayAccessor
addAllNoflush
in interface FileArrayAccessor
index
- position to insert new value to
AccessorException
public void removeNoflush(int index, int count) throws AccessorException
FileArrayAccessor
null
, the
interest sets and accessor paths are updated and decreased.
If there was an accessor, it becomes invalid.
removeNoflush
in interface FileArrayAccessor
AccessorException
public java.lang.Object get(int index, Binding valueBinding) throws AccessorException
ArrayAccessor
get
in interface ArrayAccessor
AccessorException
public void get(int index, Binding valueBinding, java.lang.Object dst) throws AccessorException
ArrayAccessor
get
in interface ArrayAccessor
AccessorException
public <T extends Accessor> T getAccessor(int index) throws AccessorConstructionException
ArrayAccessor
The accessor is not to the index, it is to the element. For instance, you get accessor X of [2] then a new value is inserted before 2. The accessor now points to the element at [3].
getAccessor
in interface ArrayAccessor
AccessorConstructionException
public <T extends Accessor> T getComponent(ChildReference reference) throws AccessorConstructionException
Accessor
InvalidatedEvent is thrown from the accessor if it is unlinked from the parent hierarchy.
getComponent
in interface Accessor
reference
- component reference path or null
to return _this_ accessor
AccessorConstructionException
public void getAll(Binding valueBinding, java.lang.Object[] array) throws AccessorException
ArrayAccessor
array
.
Exception is thrown if Array length is too short.
getAll
in interface ArrayAccessor
AccessorException
public void getAll(Binding valueBinding, java.util.Collection<java.lang.Object> values) throws AccessorException
ArrayAccessor
getAll
in interface ArrayAccessor
AccessorException
public void setSizeNoflush(int newSize) throws AccessorException
FileArrayAccessor
setSizeNoflush
in interface FileArrayAccessor
AccessorException
public void setSize(int newSize) throws AccessorException
setSize
in interface ArrayAccessor
AccessorException
public int size() throws AccessorException
ArrayAccessor
size
in interface ArrayAccessor
AccessorException
public void add(Binding binding, java.lang.Object value) throws AccessorException
ArrayAccessor
add
in interface ArrayAccessor
value
- value
AccessorException
public void add(int index, Binding binding, java.lang.Object value) throws AccessorException
ArrayAccessor
add
in interface ArrayAccessor
index
- position to insert new value tovalue
- value
AccessorException
public void addAll(Binding binding, java.lang.Object[] values) throws AccessorException
ArrayAccessor
addAll
in interface ArrayAccessor
values
- value
AccessorException
public void addAll(int index, Binding binding, java.lang.Object[] values) throws AccessorException
ArrayAccessor
addAll
in interface ArrayAccessor
index
- position to insert new value to
AccessorException
public void remove(int index, int count) throws AccessorException
ArrayAccessor
index
, the
interest sets and accessor paths are updated and decreased.
If there was an accessor, it becomes invalid.
remove
in interface ArrayAccessor
AccessorException
public void set(int index, Binding binding, java.lang.Object value) throws AccessorException
ArrayAccessor
set
in interface ArrayAccessor
AccessorException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |