Class BigDogArray_I8

java.lang.Object
org.ddogleg.struct.BigDogArrayBase<byte[]>
org.ddogleg.struct.BigDogArray_I8

public class BigDogArray_I8 extends BigDogArrayBase<byte[]>
Implementation of BigDogArrayBase for byte[].
  • Constructor Details

    • BigDogArray_I8

      public BigDogArray_I8()
    • BigDogArray_I8

      public BigDogArray_I8(int initialAllocation)
    • BigDogArray_I8

      public BigDogArray_I8(int initialAllocation, int blockSize, BigDogGrowth growth)
  • Method Details

    • newArrayInstance

      protected byte[] newArrayInstance(int size)
      Specified by:
      newArrayInstance in class BigDogArrayBase<byte[]>
    • arrayLength

      protected int arrayLength(byte[] array)
      Specified by:
      arrayLength in class BigDogArrayBase<byte[]>
    • append

      public void append(byte value)
      Appends a single value to the end of the array
      Parameters:
      value - (Input) The new value which is to be added
    • add

      public void add(byte value)
      Appends a single value to the end of the array. identical to append(byte).
      Parameters:
      value - (Input) The new value which is to be added
    • resize

      public void resize(int desiredSize, byte initialValue)
      Resizes the array and fills all new elements with the specified value
      Parameters:
      desiredSize - New array size
      initialValue - The value of new elements
    • fill

      public void fill(int idx0, int idx1, byte value)
      Fills the elements in the specified range with the specified value.
      Parameters:
      idx0 - (Input) First index, inclusive.
      idx1 - (Input) last index, exclusive.
      value - (Input) Fill value
    • set

      public void set(int index, byte value)
      Assigns an element a new value
      Parameters:
      index - (Input) Which element to modify
      value - (Input) The element's new value
    • setTail

      public void setTail(int index, byte value)
      Assigns an element a new value, counting from the end of the array.
      Parameters:
      index - (Input) Index relative to the end counting in reverse order. setTail(0, 5) = set(size-1, 5)
      value - (Input) The element's new value
    • getArray

      public void getArray(int index, byte[] array, int offset, int length)
      Copies a sub-array into the passed in array
      Parameters:
      index - (Input) Start index in this array
      array - (Output) destination array
      offset - Offset from start of destination array
      length - Number of elements to copy
    • get

      public byte get(int index)
      Returns the value in the array at the specified index
      Parameters:
      index - (Input) Index in the array
      Returns:
      value at index
    • getTail

      public byte getTail(int index)
      Returns the value in the array at the specified index, counting from the end of the array.
      Parameters:
      index - (Input) Index relative to the end counting in reverse order. 0 = get(size-1)
    • forEach

      public void forEach(int idx0, int idx1, DogArray_I8.FunctionEach op)
      Simulates a for-each loop. Passes in element values to 'op' from the specified range.
      Parameters:
      idx0 - (Input) First index, inclusive.
      idx1 - (Input) Last index, exclusive.
      op - The operator which processes the values
    • forIdx

      public void forIdx(int idx0, int idx1, DogArray_I8.FunctionEachIdx op)
      Simulates a for-each loop. Passes in array indexes and element values to 'op' from the specified range.
      Parameters:
      idx0 - (Input) First index, inclusive.
      idx1 - (Input) Last index, exclusive.
      op - The operator which processes the values
    • applyIdx

      public void applyIdx(int idx0, int idx1, DogArray_I8.FunctionApplyIdx op)
      Simulates a for-each loop. Passes in array indexes and element values to 'op' from the specified range. After calling op, the array is modified by the return value
      Parameters:
      idx0 - (Input) First index, inclusive.
      idx1 - (Input) Last index, exclusive.
      op - The operator which processes the values