Interface MFBool

All Superinterfaces:
MField, X3DField
All Known Implementing Classes:
MFBoolObject

public interface MFBool
extends MField
MFBool is an array of Boolean values. Type MFBool was previously undefined in the VRML 97 Specification, but nevertheless needed for event utilities and scripting. Example use: MFBool is useful for defining a series of behavior states using a BooleanSequencer prototype. Hint: boolean values are lower case (true|false) in order to maintain compatibility with HTML and other XML documents.


Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
See Also:
SAI Java Specification: B.4.8, SAI Abstract Specification: 5.2.2 SAIBoolean, X3D Abstract Specification: 5.3.1 SFBool and MFBool, X3D Tooltips, X3D Tooltips: field, X3D Tooltips: fieldValue, X3D Scene Authoring Hints
  • Method Summary

    Modifier and Type Method Description
    void append​(boolean newValue)
    Places a new value at the end of the existing value array, increasing the field length accordingly.
    boolean get1Value​(int index)
    Get an individual value from the existing field array.
    void getValue​(boolean[] valueDestination)
    Write out the current value of this field into the external valueDestination array.
    void insertValue​(int index, boolean newValue)
    Insert a new value prior to the index location in the existing value array, increasing the field length accordingly.
    void set1Value​(int index, boolean newValue)
    Replace a single value at the appropriate location in the existing value array.
    void setValue​(int size, boolean[] newValue)
    Assign an array subset to this field.

    Methods inherited from interface org.web3d.x3d.sai.MField

    clear, remove, size

    Methods inherited from interface org.web3d.x3d.sai.X3DField

    addX3DEventListener, getDefinition, isReadable, isWritable, removeX3DEventListener
  • Method Details

    • getValue

      void getValue​(boolean[] valueDestination)
      Write out the current value of this field into the external valueDestination array.
      Parameters:
      valueDestination - The array to be filled in with current field values.
      Throws:
      java.lang.ArrayIndexOutOfBoundsException - The provided valueDestination array was too small.
    • get1Value

      boolean get1Value​(int index)

      Get an individual value from the existing field array.

      If the index is outside the bounds of the current array of data values, an ArrayIndexOutOfBoundsException is thrown.

      Parameters:
      index - is position of selected value in current array
      Returns:
      The selected value
      Throws:
      java.lang.ArrayIndexOutOfBoundsException - The index was outside of the bounds of the current array.
    • setValue

      void setValue​(int size, boolean[] newValue)
      Assign an array subset to this field.
      Parameters:
      size - indicates size of result to copy (i.e. the number of typed singleton values) from beginning of newValue array.
      newValue - The replacement value array to (potentially) slice and then assign.
    • set1Value

      void set1Value​(int index, boolean newValue) throws java.lang.ArrayIndexOutOfBoundsException
      Replace a single value at the appropriate location in the existing value array. Size of the current underlying value array does not change.
      Parameters:
      index - is position of selected value in current array
      newValue - provides new value to apply
      Throws:
      java.lang.ArrayIndexOutOfBoundsException
    • append

      void append​(boolean newValue)
      Places a new value at the end of the existing value array, increasing the field length accordingly.
      Parameters:
      newValue - The newValue to append
    • insertValue

      void insertValue​(int index, boolean newValue)
      Insert a new value prior to the index location in the existing value array, increasing the field length accordingly.
      Parameters:
      index - The position for the inserted value in the current array
      newValue - The newValue to insert