Class ArrayBoolean

    • Constructor Detail

      • 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 Detail

      • size

        public final int size()
        Description copied from class: ListBoolean
        Returns the number of elements in the collection.
        Specified by:
        size in class ListBoolean
        Returns:
        the number of elements in the collection
      • 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
      • of

        public static ArrayBoolean of​(boolean... values)
        Returns an unmodifiable ArrayBoolean wrapper for the given boolean array.
        Parameters:
        values - a primitive array.
        Returns:
        an immutable wrapper.