org.simantics.databoard.accessor.binary
Class BinaryBoolean

java.lang.Object
  extended by org.simantics.databoard.accessor.binary.BinaryObject
      extended by org.simantics.databoard.accessor.binary.BinaryBoolean
All Implemented Interfaces:
Accessor, BooleanAccessor, CloseableAccessor, FileAccessor, FileBooleanAccessor, ParametrisedAccessor

public class BinaryBoolean
extends BinaryObject
implements BooleanAccessor, FileBooleanAccessor


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.simantics.databoard.accessor.Accessor
Accessor.Listener
 
Constructor Summary
BinaryBoolean(BinaryObject parent, Blob blob, BooleanType type, AccessorParams params)
           
 
Method Summary
<T extends Accessor>
T
getComponent(ChildReference reference)
          Open an accessor to a child.
 boolean getValue()
           
 java.lang.Object getValue(Binding binding)
          Get a snapshot of the object model as a single data value.
 void setValue(boolean newValue)
           
 void setValueNoflush(Binding binding, java.lang.Object newValue)
          Write a new value and don't flush the buffer
 void setValueNoflush(boolean newValue)
           
 BooleanType 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, 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.file.FileAccessor
close, file, flush
 
Methods inherited from interface org.simantics.databoard.accessor.Accessor
addListener, apply, getValue, removeListener, setValue
 

Constructor Detail

BinaryBoolean

public BinaryBoolean(BinaryObject parent,
                     Blob blob,
                     BooleanType type,
                     AccessorParams params)
              throws AccessorConstructionException
Throws:
AccessorConstructionException
Method Detail

type

public BooleanType type()
Description copied from interface: Accessor
Get structural represtentation of the accessor presented in databoard's type system.

Specified by:
type in interface Accessor
Specified by:
type in interface BooleanAccessor
Overrides:
type in class BinaryObject
Returns:
type description

getValue

public boolean getValue()
                 throws AccessorException
Specified by:
getValue in interface BooleanAccessor
Throws:
AccessorException

getComponent

public <T extends Accessor> T getComponent(ChildReference reference)
                                throws AccessorConstructionException
Description copied from interface: Accessor
Open an accessor to a child. If one already exists, the existing is returned, otherwise a new is created. Child accessors are often remembered with weak reference.

InvalidatedEvent is thrown from the accessor if it is unlinked from the parent hierarchy.

Specified by:
getComponent in interface Accessor
Parameters:
reference - component reference path or null to return _this_ accessor
Returns:
accessor
Throws:
AccessorConstructionException

getValue

public java.lang.Object getValue(Binding binding)
                          throws AccessorException
Description copied from interface: Accessor
Get a snapshot of the object model as a single data value.

Accessor makes type adaption to users binding if possible.

Specified by:
getValue in interface Accessor
Overrides:
getValue in class BinaryObject
Returns:
the value
Throws:
AccessorException

setValueNoflush

public void setValueNoflush(boolean newValue)
                     throws AccessorException
Specified by:
setValueNoflush in interface FileBooleanAccessor
Throws:
AccessorException

setValue

public void setValue(boolean newValue)
              throws AccessorException
Specified by:
setValue in interface BooleanAccessor
Throws:
AccessorException

setValueNoflush

public void setValueNoflush(Binding binding,
                            java.lang.Object newValue)
                     throws AccessorException
Description copied from class: BinaryObject
Write a new value and don't flush the buffer

Specified by:
setValueNoflush in interface FileAccessor
Specified by:
setValueNoflush in class BinaryObject
Throws:
AccessorException