scala.collection.JavaConversions
A class supporting filtered operations.
Adds two or more elements to this collection and returns the collection itself.
Adds a single element to this collection and returns the collection itself.
Creates a new collection containing both the elements of this collection and the provided traversable object.
[use case] Concatenates this buffer with the elements of a traversable collection.
Concatenates this buffer with the elements of a traversable collection.
This method prepends elements to the buffer and returns the same buffer.
Adds a number of elements in an array
Appends all elements produced by a TraversableOnce to this buffer.
Prepends elements to this buffer.
This method prepends elements to the buffer and returns the same buffer.
[use case] Prepends an element to this buffer
Prepends an element to this buffer
Appends a single element to this buffer.
Appends two or more elements to this buffer.
Prepends a single element to this buffer.
Creates a new collection with all the elements of this collection except the two or more specified elements.
Creates a new collection with all the elements of this collection except elem
.
Creates a new collection with all the elements of this collection except those provided by the specified traversable object.
Removes all elements produced by an iterator from this buffer.
Removes a single element from this buffer, at its first occurrence.
Removes two or more elements from this buffer.
Applies a binary operator to a start value and all elements of this buffer, going left to right.
[use case] Appends an element to this buffer
Appends an element to this buffer
Applies a binary operator to all elements of this buffer and a start value, going right to left.
Send a message to this scriptable object.
Appends all elements of this buffer to a string builder.
Appends all elements of this buffer to a string builder using a separator string.
Appends all elements of this buffer to a string builder using start, end, and separator strings.
Composes this partial function with a transformation function that gets applied to results of this partial function.
Appends the given elements to this buffer.
Appends the elements contained in a traversable object to this buffer.
Selects an element by its index in the buffer.
Method called from equality methods, so that user-defined subclasses can refuse to be equal to other collections of the same kind.
Clears the buffer's contents.
This method creates and returns a copy of the receiver object.
[use case] Builds a new collection by applying a partial function to all elements of this buffer on which the function is defined.
Builds a new collection by applying a partial function to all elements of this buffer on which the function is defined.
The factory companion object that builds instances of class Buffer.
(f compose g)(x) == f(g(x))
Tests whether this buffer contains a given value as an element.
Tests whether this buffer contains a given sequence as a slice.
[use case] Copies elements of this buffer to an array.
Copies elements of this buffer to an array.
[use case] Copies values of this buffer to an array.
Copies values of this buffer to an array.
[use case] Copies values of this buffer to an array.
Copies values of this buffer to an array.
Copies all elements of this buffer to a buffer.
Tests whether every element of this buffer relates to the corresponding element of another sequence by satisfying a test predicate.
Counts the number of elements in the buffer which satisfy a predicate.
[use case] Computes the multiset difference between this buffer and another sequence.
Computes the multiset difference between this buffer and another sequence.
Builds a new buffer from this buffer without any duplicate elements.
Selects all elements except first n ones.
Selects all elements except last n ones.
Drops longest prefix of elements that satisfy a predicate.
Tests whether this buffer ends with the given sequence.
The equality method defined in AnyRef
.
Tests whether every element of this buffer relates to the corresponding element of another sequence by satisfying a test predicate.
Tests whether a predicate holds for some of the elements of this buffer.
Selects all elements of this buffer which satisfy a predicate.
Selects all elements of this buffer which do not satisfy a predicate.
Finds the first element of the buffer satisfying a predicate, if any.
Returns index of the first element satisfying a predicate, or -1
.
Returns index of the last element satisfying a predicate, or -1.
None
if iterable is empty.
[use case] Builds a new collection by applying a function to all elements of this buffer and concatenating the results.
Builds a new collection by applying a function to all elements of this buffer and concatenating the results.
[use case] Converts this buffer of traversable collections into a buffer in which all element collections are concatenated.
Converts this buffer of traversable collections into a buffer in which all element collections are concatenated.
Applies a binary operator to a start value and all elements of this buffer, going left to right.
Applies a binary operator to all elements of this buffer and a start value, going right to left.
Tests whether a predicate holds for all elements of this buffer.
[use case] Applies a function f
to all elements of this buffer.
Applies a function f
to all elements of this buffer.
The generic builder that builds instances of Buffer at arbitrary element types.
Partitions this buffer into a map of buffers according to some discriminator function.
Partitions elements in fixed size buffers.
Tests whether this buffer is known to have a finite size.
Hashcodes for Buffer produce a value from the hashcodes of all the elements of the buffer.
Selects the first element of this buffer.
Optionally selects the first element.
[use case] Finds index of first occurrence of some value in this buffer after or at some start index.
Finds index of first occurrence of some value in this buffer after or at some start index.
[use case] Finds index of first occurrence of some value in this buffer.
Finds index of first occurrence of some value in this buffer.
Finds first index after or at a start index where this buffer contains a given sequence as a slice.
Finds first index where this buffer contains a given sequence as a slice.
Finds index of the first element satisfying some predicate after or at some start index.
Finds index of first element satisfying some predicate.
Produces the range of all indices of this sequence.
Selects all elements except the last.
Inserts new elements at a given index into this buffer.
Inserts new elements at a given index into this buffer.
[use case] Computes the multiset intersection between this buffer and another sequence.
Computes the multiset intersection between this buffer and another sequence.
Tests whether this buffer contains given index.
Tests whether this buffer is empty.
Tests whether this buffer can be repeatedly traversed.
Creates a new iterator over all elements contained in this iterable object.
Selects the last element.
[use case] Finds index of last occurrence of some value in this buffer before or at a given end index.
Finds index of last occurrence of some value in this buffer before or at a given end index.
[use case] Finds index of last occurrence of some value in this buffer.
Finds index of last occurrence of some value in this buffer.
Finds last index before or at a given end index where this buffer contains a given sequence as a slice.
Finds last index where this buffer contains a given sequence as a slice.
Finds index of last element satisfying some predicate before or at given end index.
Finds index of last element satisfying some predicate.
Optionally selects the last element.
The length of the buffer.
Compares the length of this buffer to a test value.
Turns this partial function into an plain function returning an Option
result.
[use case] Builds a new collection by applying a function to all elements of this buffer.
Builds a new collection by applying a function to all elements of this buffer.
[use case] Finds the largest element.
Finds the largest element.
[use case] Finds the smallest element.
Finds the smallest element.
Displays all elements of this buffer in a string.
Displays all elements of this buffer in a string using a separator string.
Displays all elements of this buffer in a string using start, end, and separator strings.
Tests whether the buffer is not empty.
Composes this partial function with a fallback partial function which gets applied where this partial function is not defined.
[use case] Appends an element value to this buffer until a given target length is reached.
Appends an element value to this buffer until a given target length is reached.
Partitions this buffer in two buffers according to a predicate.
[use case] Produces a new buffer where a slice of elements in this buffer is replaced by another sequence.
Produces a new buffer where a slice of elements in this buffer is replaced by another sequence.
Returns the length of the longest prefix whose elements all satisfy some predicate.
Prepends given elements to this buffer.
Prepends the elements contained in a traversable object to this buffer.
[use case] Multiplies up the elements of this collection.
Multiplies up the elements of this collection.
return k for a product A(x_1,.
def
productElement(arg0: Int): Any
For a product A(x_1,.
def
productElements: Iterator[Any]
def
productIterator: Iterator[Any]
An iterator that returns all fields of this product
def
productPrefix: String
By default the empty string.
def
projection: SeqView[A, Buffer[A]]
returns a projection that can be used to call non-strict filter
,map
, and flatMap
methods that build projections
of the collection.
def
readOnly: Seq[A]
Provide a read-only view of this buffer as a sequence
def
reduceLeft[B >: A](op: (B, A) ⇒ B): B
Applies a binary operator to all elements of this buffer, going left to right.
def
reduceLeftOption[B >: A](op: (B, A) ⇒ B): Option[B]
Optionally applies a binary operator to all elements of this buffer, going left to right.
def
reduceRight[B >: A](op: (A, B) ⇒ B): B
Applies a binary operator to all elements of this buffer, going right to left.
def
reduceRightOption[B >: A](op: (A, B) ⇒ B): Option[B]
Optionally applies a binary operator to all elements of this buffer, going right to left.
def
remove(i: Int): A
Removes the element at a given index from this buffer.
def
remove(n: Int, count: Int): Unit
Removes a number of elements from a given index position.
def
repr: Buffer[A]
The collection of type buffer underlying this TraversableLike
object.
def
result: JListWrapper[A]
def
reverse: Buffer[A]
Returns new buffer wih elements in reversed order.
def
reverseIterator: Iterator[A]
An iterator yielding elements in reversed order.
def
reverseMap[B](f: (A) ⇒ B): Seq[B]
[use case] Builds a new collection by applying a function to all elements of this buffer and
collecting the results in reversed order.
def
reverseMap[B, That](f: (A) ⇒ B)(implicit bf: CanBuildFrom[Buffer[A], B, That]): That
Builds a new collection by applying a function to all elements of this buffer and
collecting the results in reversed order.
def
reversedElements: Iterator[A]
def
sameElements(that: Iterable[A]): Boolean
[use case] Checks if the other iterable collection contains the same elements in the same order as this buffer.
def
sameElements[B >: A](that: Iterable[B]): Boolean
Checks if the other iterable collection contains the same elements in the same order as this buffer.
def
scanLeft[B, That](z: B)(op: (B, A) ⇒ B)(implicit bf: CanBuildFrom[Buffer[A], B, That]): That
Produces a collection containing cummulative results of applying the operator going left to right.
def
scanRight[B, That](z: B)(op: (A, B) ⇒ B)(implicit bf: CanBuildFrom[Buffer[A], B, That]): That
Produces a collection containing cummulative results of applying the operator going right to left.
def
segmentLength(p: (A) ⇒ Boolean, from: Int): Int
Computes length of longest segment whose elements all satisfy some predicate.
def
size: Int
The size of this buffer, equivalent to length
.
def
slice(from: Int, until: Int): Buffer[A]
Selects an interval of elements.
def
sliding[B >: A](size: Int, step: Int): Iterator[Buffer[A]]
def
sliding[B >: A](size: Int): Iterator[Buffer[A]]
Groups elements in fixed size blocks by passing a "sliding window"
over them (as opposed to partitioning them, as is done in grouped.
def
sortBy[B](f: (A) ⇒ B)(implicit ord: Ordering[B]): Buffer[A]
Sorts this Buffer according to the Ordering which results from transforming
an implicitly given Ordering with a transformation function.
def
sortWith(lt: (A, A) ⇒ Boolean): Buffer[A]
Sorts this buffer according to a comparison function.
def
sorted[B >: A](implicit ord: Ordering[B]): Buffer[A]
Sorts this buffer according to an Ordering.
def
span(p: (A) ⇒ Boolean): (Buffer[A], Buffer[A])
Splits this buffer into a prefix/suffix pair according to a predicate.
def
splitAt(n: Int): (Buffer[A], Buffer[A])
Splits this buffer into two at a given position.
def
startsWith[B](that: Seq[B]): Boolean
Tests whether this buffer starts with the given sequence.
def
startsWith[B](that: Seq[B], offset: Int): Boolean
Tests whether this buffer contains the given sequence at a given index.
def
stringPrefix: String
Defines the prefix of this object's toString
representation.
def
sum: Int
[use case] Sums up the elements of this collection.
def
sum[B >: A](implicit num: Numeric[B]): B
Sums up the elements of this collection.
def
tail: Buffer[A]
Selects all elements except the first.
def
take(n: Int): Buffer[A]
Selects first n elements.
def
takeRight(n: Int): Buffer[A]
Selects last n elements.
def
takeWhile(p: (A) ⇒ Boolean): Buffer[A]
Takes longest prefix of elements that satisfy a predicate.
def
toArray: Array[A]
[use case] Converts this buffer to an array.
def
toArray[B >: A](implicit arg0: ClassManifest[B]): Array[B]
Converts this buffer to an array.
def
toBuffer[B >: A]: Buffer[B]
Converts this buffer to a mutable buffer.
def
toIndexedSeq[B >: A]: IndexedSeq[B]
Converts this buffer to an indexed sequence.
def
toIterable: Iterable[A]
Converts this buffer to an iterable collection.
def
toIterator: Iterator[A]
Returns an Iterator over the elements in this buffer.
def
toList: List[A]
Converts this buffer to a list.
def
toMap[T, U](implicit ev: <:<[A, (T, U)]): Map[T, U]
Converts this buffer to a map.
def
toSeq: Seq[A]
Converts this buffer to a sequence.
def
toSet[B >: A]: Set[B]
Converts this buffer to a set.
def
toStream: Stream[A]
Converts this buffer to a stream.
def
toString(): String
Converts this buffer to a string.
def
toTraversable: Traversable[A]
Converts this buffer to an unspecified Traversable.
def
transpose[B](implicit asTraversable: (A) ⇒ Traversable[B]): Buffer[Buffer[B]]
Transposes this buffer of traversable collections into
a buffer of buffers.
def
trimEnd(n: Int): Unit
Removes the last n elements of this buffer.
def
trimStart(n: Int): Unit
Removes the first n elements of this buffer.
val
underlying: List[A]
def
union(that: Seq[A]): Seq[A]
[use case] Produces a new sequence which contains all elements of this buffer and also all elements of
a given sequence.
def
union[B >: A, That](that: Seq[B])(implicit bf: CanBuildFrom[Buffer[A], B, That]): That
Produces a new sequence which contains all elements of this buffer and also all elements of
a given sequence.
def
unzip[A1, A2](implicit asPair: (A) ⇒ (A1, A2)): (Buffer[A1], Buffer[A2])
Converts this buffer of pairs into two collections of the first and second
halfs of each pair.
def
update(i: Int, elem: A): Unit
Replaces element at given index with a new value.
def
updated(index: Int, elem: A): Seq[A]
[use case] A copy of this buffer with one single replaced element.
def
updated[B >: A, That](index: Int, elem: B)(implicit bf: CanBuildFrom[Buffer[A], B, That]): That
A copy of this buffer with one single replaced element.
def
view(from: Int, until: Int): SeqView[A, Buffer[A]]
Creates a non-strict view of a slice of this buffer.
def
view: SeqView[A, Buffer[A]]
Creates a non-strict view of this buffer.
def
withFilter(p: (A) ⇒ Boolean): FilterMonadic[A, Buffer[A]]
Creates a non-strict filter of this buffer.
def
zip[B](that: Iterable[B]): Iterable[(A, B)]
[use case] Returns a buffer formed from this buffer and another iterable collection
by combining corresponding elements in pairs.
def
zip[A1 >: A, B, That](that: Iterable[B])(implicit bf: CanBuildFrom[Buffer[A], (A1, B), That]): That
Returns a buffer formed from this buffer and another iterable collection
by combining corresponding elements in pairs.
def
zipAll[B](that: Iterable[B], thisElem: A, thatElem: B): Iterable[(A, B)]
[use case] Returns a buffer formed from this buffer and another iterable collection
by combining corresponding elements in pairs.
def
zipAll[B, A1 >: A, That](that: Iterable[B], thisElem: A1, thatElem: B)(implicit bf: CanBuildFrom[Buffer[A], (A1, B), That]): That
Returns a buffer formed from this buffer and another iterable collection
by combining corresponding elements in pairs.
def
zipWithIndex: Iterable[(A, Int)]
[use case] Zips this buffer with its indices.
def
zipWithIndex[A1 >: A, That](implicit bf: CanBuildFrom[Buffer[A], (A1, Int), That]): That
Zips this buffer with its indices.