Class ArrayBoolean

java.lang.Object
org.yamcs.studio.data.vtype.ListBoolean
org.yamcs.studio.data.vtype.ArrayBoolean
All Implemented Interfaces:
Serializable

public final class ArrayBoolean extends ListBoolean implements Serializable
Wraps a boolean[] into a ListBoolean.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    ArrayBoolean(boolean... array)
    A new read-only ArrayBoolean that wraps around the given array.
    ArrayBoolean(boolean[] array, boolean readOnly)
    A new ArrayBoolean that wraps around the given array.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    boolean
    getBoolean(int index)
    Returns the element at the specified position in this list.
    void
    setBoolean(int index, boolean value)
    Changes the element at the specified position.
    int
    Returns the number of elements in the collection.

    Methods inherited from class org.yamcs.studio.data.vtype.ListBoolean

    hashCode

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ArrayBoolean

      public ArrayBoolean(boolean... array)
      A new read-only ArrayBoolean that wraps around the given array.
      Parameters:
      array - an array
    • ArrayBoolean

      public ArrayBoolean(boolean[] array, boolean readOnly)
      A new ArrayBoolean that wraps around the given array.
      Parameters:
      array - an array
      readOnly - if false the wrapper allows writes to the array
  • Method Details

    • size

      public int size()
      Description copied from class: ListBoolean
      Returns the number of elements in the collection.
      Specified by:
      size in class ListBoolean
    • getBoolean

      public boolean getBoolean(int index)
      Description copied from class: ListBoolean
      Returns the element at the specified position in this list.
      Specified by:
      getBoolean in class ListBoolean
      Parameters:
      index - position of the element to return
      Returns:
      the element at the specified position in this list
    • setBoolean

      public void setBoolean(int index, boolean value)
      Description copied from class: ListBoolean
      Changes the element at the specified position.
      Specified by:
      setBoolean in class ListBoolean
      Parameters:
      index - position of the element to change
      value - the new value
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class ListBoolean