Class/Object

com.github.arturopala.bufferandslice

IntBuffer

Related Docs: object IntBuffer | package bufferandslice

Permalink

final class IntBuffer extends ArrayBufferLike[Int]

Growable, mutable array of integers. Unlike ArrayBuffer allows to address elements outside the range.

Linear Supertypes
ArrayBufferLike[Int], Buffer[Int], (Int) ⇒ Int, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. IntBuffer
  2. ArrayBufferLike
  3. Buffer
  4. Function1
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new IntBuffer(initialSize: Int = 8)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def andThen[A](g: (Int) ⇒ A): (Int) ⇒ A

    Permalink
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  5. final def append(value: Int): IntBuffer.this.type

    Permalink

    Appends value at the end of the buffer and advances topIndex.

    Appends value at the end of the buffer and advances topIndex.

    Definition Classes
    Buffer
    Annotations
    @inline()
  6. final def appendArray(values: Array[Int]): IntBuffer.this.type

    Permalink

    Appends values from the given array at the end of the buffer and advances topIndex.

    Appends values from the given array at the end of the buffer and advances topIndex.

    Definition Classes
    Buffer
    Annotations
    @inline()
  7. final def appendFromIterator(iterator: Iterator[Int]): IntBuffer.this.type

    Permalink

    Appends values from the given iterator at the end of the buffer and advances topIndex.

    Appends values from the given iterator at the end of the buffer and advances topIndex.

    Definition Classes
    Buffer
  8. final def appendIterable(iterable: Iterable[Int]): IntBuffer.this.type

    Permalink

    Appends values from the given iterable at the end of the buffer and advances topIndex.

    Appends values from the given iterable at the end of the buffer and advances topIndex.

    Definition Classes
    Buffer
    Annotations
    @inline()
  9. final def appendSequence(values: IndexedSeq[Int]): IntBuffer.this.type

    Permalink

    Appends values from the given sequence at the end of the buffer and advances topIndex.

    Appends values from the given sequence at the end of the buffer and advances topIndex.

    Definition Classes
    Buffer
    Annotations
    @inline()
  10. final def appendSlice(slice: Slice[Int]): IntBuffer.this.type

    Permalink

    Appends values from the given slice at the end of the buffer and advances topIndex.

    Appends values from the given slice at the end of the buffer and advances topIndex.

    Definition Classes
    Buffer
    Annotations
    @inline()
  11. def apply(index: Int): Int

    Permalink

    Returns value at the given index or 0 if out of scope.

    Returns value at the given index or 0 if out of scope.

    Definition Classes
    IntBufferBuffer → Function1
    Annotations
    @inline()
  12. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  13. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. def compose[A](g: (A) ⇒ Int): (A) ⇒ Int

    Permalink
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  15. final def drop(n: Int): Slice[Int]

    Permalink

    Drops first N items and returns a Slice.

    Drops first N items and returns a Slice.

    Definition Classes
    Buffer
  16. final def dropRight(n: Int): Slice[Int]

    Permalink

    Drops last N items and returns a Slice.

    Drops last N items and returns a Slice.

    Definition Classes
    Buffer
  17. def ensureIndex(index: Int): Unit

    Permalink

    Ensures buffer capacity to address provided index.

    Ensures buffer capacity to address provided index.

    Attributes
    protected
    Definition Classes
    IntBufferBuffer
  18. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  20. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  21. final def forward(distance: Int): IntBuffer.this.type

    Permalink

    Moves topIndex value right by the distance.

    Moves topIndex value right by the distance.

    Definition Classes
    Buffer
  22. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  23. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  24. final def head: Int

    Permalink

    Returns value at the topIndex.

    Returns value at the topIndex.

    Definition Classes
    Buffer
  25. def increment(index: Int): IntBuffer.this.type

    Permalink

    Increments the value at index.s

  26. final def insertArray(index: Int, sourceIndex: Int, insertLength: Int, sourceArray: Array[Int]): IntBuffer.this.type

    Permalink

    Shift current content to the right starting from indexat the insertLength distance, and copies array chunk into the gap.

    Shift current content to the right starting from indexat the insertLength distance, and copies array chunk into the gap. Sets topIndex to be at least at the end of the new chunk of values.

    Definition Classes
    ArrayBufferLikeBuffer
  27. final def insertFromIterator(index: Int, insertLength: Int, iterator: Iterator[Int]): IntBuffer.this.type

    Permalink

    Shift current content to the right starting from indexat the insertLength distance, and copies iterated values into the gap.

    Shift current content to the right starting from indexat the insertLength distance, and copies iterated values into the gap. Sets topIndex to be at least at the end of the new chunk of values.

    Definition Classes
    Buffer
  28. final def insertSlice(index: Int, slice: Slice[Int]): IntBuffer.this.type

    Permalink

    Shift current content to the right starting from index at the slice.length distance, and copies slice content into the gap.

    Shift current content to the right starting from index at the slice.length distance, and copies slice content into the gap. Sets topIndex to be at least at the end of the new chunk of values.

    Definition Classes
    ArrayBufferLikeBuffer
  29. final def insertValues(index: Int, sourceIndex: Int, insertLength: Int, source: (Int) ⇒ Int): IntBuffer.this.type

    Permalink

    Shift current content to the right starting from indexat the insertLength distance, iterates over the source indexes and copies values into the gap.

    Shift current content to the right starting from indexat the insertLength distance, iterates over the source indexes and copies values into the gap. Sets topIndex to be at least at the end of the new chunk of values.

    Definition Classes
    Buffer
  30. final def isEmpty: Boolean

    Permalink

    Is the accessible part of the buffer empty?

    Is the accessible part of the buffer empty?

    Definition Classes
    Buffer
    Annotations
    @inline()
  31. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  32. final def length: Int

    Permalink

    Length of the accessible part of the buffer.

    Length of the accessible part of the buffer.

    Definition Classes
    Buffer
  33. final def map(f: (Int) ⇒ Int): IntBuffer.this.type

    Permalink

    Updates all values in the range [0,length) using the function.

    Updates all values in the range [0,length) using the function.

    f

    map function

    Definition Classes
    Buffer
    Annotations
    @inline()
    Exceptions thrown

    IndexOutOfBoundsException if index lower than zero.

  34. final def modify(index: Int, map: (Int) ⇒ Int): IntBuffer.this.type

    Permalink

    Updates value at the provided index using the function.

    Updates value at the provided index using the function. Index must fall within range [0,length).

    index

    value's index

    map

    map function

    Definition Classes
    Buffer
    Exceptions thrown

    IndexOutOfBoundsException if index lower than zero.

  35. final def modifyAll(map: (Int) ⇒ Int): IntBuffer.this.type

    Permalink

    Updates all values in the range [0,length) using the function.

    Updates all values in the range [0,length) using the function.

    map

    map function

    Definition Classes
    Buffer
    Exceptions thrown

    IndexOutOfBoundsException if index lower than zero.

  36. final def modifyAllWhen(map: (Int) ⇒ Int, pred: (Int) ⇒ Boolean): IntBuffer.this.type

    Permalink

    Updates all accepted values in the range [0,length) using the function.

    Updates all accepted values in the range [0,length) using the function.

    map

    map function

    pred

    filter function

    Definition Classes
    Buffer
    Exceptions thrown

    IndexOutOfBoundsException if index lower than zero.

  37. final def modifyRange(fromIndex: Int, toIndex: Int, map: (Int) ⇒ Int): IntBuffer.this.type

    Permalink

    Updates values in the range [startIndex,toIndex)^^[0,length) using the function. One of {startIndex,toIndex} must fall within range [0,length).

    Updates values in the range [startIndex,toIndex)^^[0,length) using the function. One of {startIndex,toIndex} must fall within range [0,length).

    fromIndex

    index of the first value inclusive

    toIndex

    index of the last value exclusive

    map

    map function

    Definition Classes
    Buffer
    Exceptions thrown

    IndexOutOfBoundsException if index lower than zero.

  38. final def modifyRangeWhen(fromIndex: Int, toIndex: Int, map: (Int) ⇒ Int, pred: (Int) ⇒ Boolean): IntBuffer.this.type

    Permalink

    Updates values in the range [startIndex,toIndex)^^[0,length) using the function. One of {startIndex,toIndex} must fall within range [0,length).

    Updates values in the range [startIndex,toIndex)^^[0,length) using the function. One of {startIndex,toIndex} must fall within range [0,length).

    fromIndex

    index of the first value inclusive

    toIndex

    index of the last value exclusive

    map

    map function

    pred

    filter function

    Definition Classes
    Buffer
    Exceptions thrown

    IndexOutOfBoundsException if index lower than zero.

  39. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  40. final def nonEmpty: Boolean

    Permalink

    Is the accessible part of the buffer non empty?

    Is the accessible part of the buffer non empty?

    Definition Classes
    Buffer
    Annotations
    @inline()
  41. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  42. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  43. final def peek: Int

    Permalink

    Returns value at the topIndex.

    Returns value at the topIndex.

    Definition Classes
    Buffer
  44. final def pop: Int

    Permalink

    Returns value at the topIndex, and moves topIndex back.

    Returns value at the topIndex, and moves topIndex back.

    Definition Classes
    Buffer
  45. final def push(value: Int): IntBuffer.this.type

    Permalink

    Appends value to the topIndex.

    Appends value to the topIndex. Same as append

    Definition Classes
    Buffer
    Annotations
    @inline()
  46. final def remove(index: Int): IntBuffer.this.type

    Permalink

    Removes value at index and shifts content in [index+1, length) to the left.

    Removes value at index and shifts content in [index+1, length) to the left.

    Definition Classes
    Buffer
    Annotations
    @inline()
  47. final def removeRange(fromIndex: Int, toIndex: Int): IntBuffer.this.type

    Permalink

    Removes values in the range [fromIndex, toIndex) and shifts content in [toIndex, length) to the left.

    Removes values in the range [fromIndex, toIndex) and shifts content in [toIndex, length) to the left.

    Definition Classes
    Buffer
    Annotations
    @inline()
  48. final def replaceFromArray(index: Int, sourceIndex: Int, replaceLength: Int, sourceArray: Array[Int]): IntBuffer.this.type

    Permalink

    Replaces current values in the range [index, index + replaceLength) with values of the array range [sourceIndex, sourceIndex + replaceLength).

    Replaces current values in the range [index, index + replaceLength) with values of the array range [sourceIndex, sourceIndex + replaceLength).

    Definition Classes
    ArrayBufferLikeBuffer
  49. final def replaceFromIterator(index: Int, replaceLength: Int, iterator: Iterator[Int]): IntBuffer.this.type

    Permalink

    Replaces current values in the range [index, index + replaceLength) with values returned from the iterator.

    Replaces current values in the range [index, index + replaceLength) with values returned from the iterator.

    Definition Classes
    Buffer
  50. final def replaceFromSlice(index: Int, slice: Slice[Int]): IntBuffer.this.type

    Permalink

    Replaces current values in the range [index, index + slice.length) with values of the slice.

    Replaces current values in the range [index, index + slice.length) with values of the slice.

    Definition Classes
    ArrayBufferLikeBuffer
  51. final def replaceValues(index: Int, sourceIndex: Int, replaceLength: Int, source: (Int) ⇒ Int): IntBuffer.this.type

    Permalink

    Replaces current values in the range [index, index + replaceLength) with values returned by the function when iterating argument in the range [sourceIndex, sourceIndex + replaceLength).

    Replaces current values in the range [index, index + replaceLength) with values returned by the function when iterating argument in the range [sourceIndex, sourceIndex + replaceLength).

    Definition Classes
    Buffer
  52. final def reset: Int

    Permalink

    Resets buffer, sets topIndex to -1.

    Resets buffer, sets topIndex to -1. Does not clear existing values.

    returns

    previous topIndex

    Definition Classes
    Buffer
  53. final def rewind(distance: Int): IntBuffer.this.type

    Permalink

    Moves topIndex value left by the distance.

    Moves topIndex value left by the distance.

    Definition Classes
    Buffer
  54. final def set(index: Int): IntBuffer.this.type

    Permalink

    Sets topIndex value.

    Sets topIndex value.

    Definition Classes
    Buffer
  55. final def shiftLeft(index: Int, distance: Int): IntBuffer.this.type

    Permalink

    Moves values [index, length) left to [index-distance, length - distance).

    Moves values [index, length) left to [index-distance, length - distance). Effectively removes range (index-distance, index]. Ignores negative distance. Moves topIndex if affected.

    Definition Classes
    ArrayBufferLikeBuffer
  56. final def shiftRight(index: Int, distance: Int): IntBuffer.this.type

    Permalink

    Moves values [index, length) right to [index+distance, length + distance).

    Moves values [index, length) right to [index+distance, length + distance). Effectively creates a new range [index, index+distance). Ignores negative distance. Does not clear existing values inside [index, index+distance). Moves topIndex if affected.

    Definition Classes
    ArrayBufferLikeBuffer
  57. final def slice(from: Int, to: Int): Slice[Int]

    Permalink

    Takes range and returns a Slice.

    Takes range and returns a Slice.

    Definition Classes
    Buffer
  58. final def store(value: Int): IntBuffer.this.type

    Permalink

    Replace value at the topIndex.

    Replace value at the topIndex.

    Definition Classes
    Buffer
  59. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  60. final def take(n: Int): Slice[Int]

    Permalink

    Takes first N items and returns a Slice.

    Takes first N items and returns a Slice.

    Definition Classes
    Buffer
  61. final def takeRight(n: Int): Slice[Int]

    Permalink

    Takes last N items and returns a Slice.

    Takes last N items and returns a Slice.

    Definition Classes
    Buffer
  62. def toArray: Array[Int]

    Permalink

    Returns copy of the underlying array trimmed to length.

    Returns copy of the underlying array trimmed to length.

    Definition Classes
    IntBufferBuffer
  63. def toSlice: IntSlice

    Permalink

    Wraps underlying array as a Slice.

    Wraps underlying array as a Slice.

    Definition Classes
    IntBufferBuffer
  64. final def toString(): String

    Permalink
    Definition Classes
    ArrayBufferLike → Function1 → AnyRef → Any
  65. final def top: Int

    Permalink

    Returns topIndex value.

    Returns topIndex value.

    Definition Classes
    Buffer
  66. def underlyingUnsafe: Array[Int]

    Permalink

    Very unsafe access to the underlying array, if you really need it.

    Very unsafe access to the underlying array, if you really need it.

    Definition Classes
    IntBufferArrayBufferLike
  67. final def update(index: Int, value: Int): IntBuffer.this.type

    Permalink

    Updates value at the provided index.

    Updates value at the provided index. Alters underlying array if necessary.

    Definition Classes
    ArrayBufferLikeBuffer
    Exceptions thrown

    IndexOutOfBoundsException if index lower than zero.

  68. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  69. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  70. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from ArrayBufferLike[Int]

Inherited from Buffer[Int]

Inherited from (Int) ⇒ Int

Inherited from AnyRef

Inherited from Any

Abstract

Stack Ops

Unsafe

Properties

Update

Append

Insert

Replace

Remove

Shift

Limit

Slice

Ungrouped