final class IntBuffer extends ArrayBufferLike[Int]
Growable, mutable array of integers. Unlike ArrayBuffer allows to address elements outside the range.
- Grouped
- Alphabetic
- By Inheritance
- IntBuffer
- ArrayBufferLike
- Buffer
- Function1
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new IntBuffer(initialSize: Int = 8)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
andThen[A](g: (Int) ⇒ A): (Int) ⇒ A
- Definition Classes
- Function1
- Annotations
- @unspecialized()
-
final
def
append(value: Int): IntBuffer.this.type
Appends value at the end of buffer and advances topIndex.
Appends value at the end of buffer and advances topIndex.
- Definition Classes
- Buffer
- Annotations
- @inline()
-
final
def
appendArray(values: Array[Int]): IntBuffer.this.type
Appends values from the given array at the end of buffer and advances topIndex.
Appends values from the given array at the end of buffer and advances topIndex.
- Definition Classes
- Buffer
- Annotations
- @inline()
-
final
def
appendFromIterator(iterator: Iterator[Int]): IntBuffer.this.type
Appends values from the given iterator at the end of buffer and advances topIndex.
Appends values from the given iterator at the end of buffer and advances topIndex.
- Definition Classes
- Buffer
-
final
def
appendIterable(iterable: Iterable[Int]): IntBuffer.this.type
Appends values from the given iterable at the end of buffer and advances topIndex.
Appends values from the given iterable at the end of buffer and advances topIndex.
- Definition Classes
- Buffer
- Annotations
- @inline()
-
final
def
appendSequence(values: IndexedSeq[Int]): IntBuffer.this.type
Appends values from the given sequence at the end of buffer and advances topIndex.
Appends values from the given sequence at the end of buffer and advances topIndex.
- Definition Classes
- Buffer
- Annotations
- @inline()
-
def
apply(index: Int): Int
Returns value at the given index or 0 if out of scope.
-
def
array: Array[Int]
- Attributes
- protected
- Definition Classes
- IntBuffer → ArrayBufferLike
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
compose[A](g: (A) ⇒ Int): (A) ⇒ Int
- Definition Classes
- Function1
- Annotations
- @unspecialized()
-
def
copyFrom(index: Int, slice: IntSlice): Unit
Copy values directly from IntSlice's array into the buffer array.
-
final
def
drop(n: Int): Slice[Int]
Drops first N items and returns a Slice.
Drops first N items and returns a Slice.
- Definition Classes
- Buffer
-
final
def
dropRight(n: Int): Slice[Int]
Drops last N items and returns a Slice.
Drops last N items and returns a Slice.
- Definition Classes
- Buffer
-
def
ensureIndex(index: Int): Unit
Ensures buffer capacity to address provided index.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
forward(distance: Int): IntBuffer.this.type
Moves topIndex value right by the distance.
Moves topIndex value right by the distance.
- Definition Classes
- Buffer
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
head: Int
Returns value at the topIndex.
Returns value at the topIndex.
- Definition Classes
- Buffer
-
def
increment(index: Int): IntBuffer.this.type
Increments the value at index.s
-
final
def
insertArray(index: Int, sourceIndex: Int, insertLength: Int, sourceArray: Array[Int]): IntBuffer.this.type
Shift current content to the right starting from
indexat theinsertLengthdistance, and copies array chunk into the gap.Shift current content to the right starting from
indexat theinsertLengthdistance, and copies array chunk into the gap. Sets topIndex to be at least at the end of the new chunk of values.- Definition Classes
- ArrayBufferLike → Buffer
-
final
def
insertFromIterator(index: Int, insertLength: Int, iterator: Iterator[Int]): IntBuffer.this.type
Shift current content to the right starting from
indexat theinsertLengthdistance, and copies iterated values into the gap.Shift current content to the right starting from
indexat theinsertLengthdistance, 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
-
final
def
insertValues(index: Int, sourceIndex: Int, insertLength: Int, source: (Int) ⇒ Int): IntBuffer.this.type
Shift current content to the right starting from
indexat theinsertLengthdistance, iterates over the source indexes and copies values into the gap.Shift current content to the right starting from
indexat theinsertLengthdistance, 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
-
final
def
isEmpty: Boolean
Is the accessible part of the buffer empty?
Is the accessible part of the buffer empty?
- Definition Classes
- Buffer
- Annotations
- @inline()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
length: Int
Length of the accessible part of the buffer.
Length of the accessible part of the buffer.
- Definition Classes
- Buffer
-
final
def
map(f: (Int) ⇒ Int): IntBuffer.this.type
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
IndexOutOfBoundsExceptionif index lower than zero.
-
final
def
modify(index: Int, map: (Int) ⇒ Int): IntBuffer.this.type
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
IndexOutOfBoundsExceptionif index lower than zero.
-
final
def
modifyAll(map: (Int) ⇒ Int): IntBuffer.this.type
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
IndexOutOfBoundsExceptionif index lower than zero.
-
final
def
modifyAllWhen(map: (Int) ⇒ Int, pred: (Int) ⇒ Boolean): IntBuffer.this.type
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
IndexOutOfBoundsExceptionif index lower than zero.
-
final
def
modifyRange(fromIndex: Int, toIndex: Int, map: (Int) ⇒ Int): IntBuffer.this.type
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
IndexOutOfBoundsExceptionif index lower than zero.
-
final
def
modifyRangeWhen(fromIndex: Int, toIndex: Int, map: (Int) ⇒ Int, pred: (Int) ⇒ Boolean): IntBuffer.this.type
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
IndexOutOfBoundsExceptionif index lower than zero.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
nonEmpty: Boolean
Is the accessible part of the buffer non empty?
Is the accessible part of the buffer non empty?
- Definition Classes
- Buffer
- Annotations
- @inline()
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
peek: Int
Returns value at the topIndex.
Returns value at the topIndex.
- Definition Classes
- Buffer
-
final
def
pop: Int
Returns value at the topIndex, and moves topIndex back.
Returns value at the topIndex, and moves topIndex back.
- Definition Classes
- Buffer
-
final
def
push(value: Int): IntBuffer.this.type
Appends value to the topIndex.
-
final
def
remove(index: Int): IntBuffer.this.type
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()
-
final
def
removeRange(fromIndex: Int, toIndex: Int): IntBuffer.this.type
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()
-
final
def
replaceFromArray(index: Int, sourceIndex: Int, replaceLength: Int, sourceArray: Array[Int]): IntBuffer.this.type
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
- ArrayBufferLike → Buffer
-
final
def
replaceFromIterator(index: Int, replaceLength: Int, iterator: Iterator[Int]): IntBuffer.this.type
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
-
final
def
replaceValues(index: Int, sourceIndex: Int, replaceLength: Int, source: (Int) ⇒ Int): IntBuffer.this.type
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
-
final
def
reset: Int
Resets buffer, sets topIndex to -1.
Resets buffer, sets topIndex to -1. Does not clear existing values.
- returns
previous topIndex
- Definition Classes
- Buffer
-
final
def
rewind(distance: Int): IntBuffer.this.type
Moves topIndex value left by the distance.
Moves topIndex value left by the distance.
- Definition Classes
- Buffer
-
final
def
set(index: Int): IntBuffer.this.type
Sets topIndex value.
Sets topIndex value.
- Definition Classes
- Buffer
-
final
def
shiftLeft(index: Int, distance: Int): IntBuffer.this.type
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
- ArrayBufferLike → Buffer
-
final
def
shiftRight(index: Int, distance: Int): IntBuffer.this.type
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
- ArrayBufferLike → Buffer
-
final
def
slice(from: Int, to: Int): Slice[Int]
Takes range and returns a Slice.
Takes range and returns a Slice.
- Definition Classes
- Buffer
-
final
def
store(value: Int): IntBuffer.this.type
Replace value at the topIndex.
Replace value at the topIndex.
- Definition Classes
- Buffer
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
take(n: Int): Slice[Int]
Takes first N items and returns a Slice.
Takes first N items and returns a Slice.
- Definition Classes
- Buffer
-
final
def
takeRight(n: Int): Slice[Int]
Takes last N items and returns a Slice.
Takes last N items and returns a Slice.
- Definition Classes
- Buffer
-
def
toArray: Array[Int]
Returns copy of the underlying array trimmed to length.
-
def
toSlice: IntSlice
Wraps underlying array as a Slice.
-
final
def
toString(): String
- Definition Classes
- ArrayBufferLike → Function1 → AnyRef → Any
-
final
def
top: Int
Returns topIndex value.
Returns topIndex value.
- Definition Classes
- Buffer
-
final
def
update(index: Int, value: Int): IntBuffer.this.type
Updates value at the provided index.
Updates value at the provided index. Alters underlying array if necessary.
- Definition Classes
- ArrayBufferLike → Buffer
- Exceptions thrown
IndexOutOfBoundsExceptionif index lower than zero.
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()