Scala Library
|
|
scala/collection/JavaConversions.scala
]
case
class
JListWrapper[A](val
underlying : java.util.List[A])
extends
Buffer[A] with
ProductMethod Summary | |
def
|
+:
(elem : A) : JListWrapper[A]
Prepend a single element to this buffer and return
the identity of the buffer.
|
def
|
+=
(elem : A) : JListWrapper[A]
Append a single element to this buffer.
|
def
|
apply
(i : Int) : A
Return element at index `n`
|
override def
|
canEqual
(arg0 : Any) : Boolean
An equality helper method to assist in maintaining reflexivity
in the face of subtyping. For more, see
http://www.artima.com/lejava/articles/equality.html
|
def
|
clear
: Unit
Clears the buffer contents.
|
def
|
insertAll
(i : Int, elems : Traversable[A]) : Unit
Inserts new elements at the index
n . Opposed to method
update , this method will not replace an element with a
one. Instead, it will insert a new element at index n . |
override def
|
isEmpty
: Boolean
Does this iterable contain no elements?
|
override def
|
iterator
: Iterator[A]
Creates a new iterator over all elements contained in this
iterable object.
|
def
|
length
: Int
Return number of elements in the buffer
|
override def
|
productArity
: Int
return k for a product
A(x_1,...,x_k) |
override def
|
productElement
(arg0 : Int) : Any
for a product
A(x_1,...,x_k) , returns x_(n+1)
for 0 <= n < k |
override def
|
productPrefix
: java.lang.String
By default the empty string. Implementations may override this
method in order to prepend a string prefix to the result of the
toString methods.
|
def
|
remove
(i : Int) : A
Removes the element on a given index position.
|
def
|
result : JListWrapper[A] |
def
|
update
(i : Int, elem : A) : Unit
Replace element at index
n with the new element
newelem . |
Methods inherited from Product | |
productIterator, productElements |
Methods inherited from Buffer | |
companion |
Methods inherited from BufferTemplate | |
remove, -=, ++:, ++:, append, appendAll, prepend, prependAll, prependAll, insert, trimStart, trimEnd, <<, stringPrefix, ++=, +, +, ++, ++, -, -, --, -- |
Methods inherited from Cloneable | |
clone |
Methods inherited from Shrinkable | |
-=, --=, --= |
Methods inherited from Growable | |
+=, ++=, ++= |
Methods inherited from Unhashable | |
hashCode, identityHashCode |
Methods inherited from SequenceTemplate | |
lengthCompare, size, isDefinedAt, zip, zipAll, zipWithIndex, segmentLength, prefixLength, indexWhere, indexWhere, findIndexOf, indexOf, indexOf, lastIndexOf, lastIndexOf, lastIndexWhere, lastIndexWhere, reverse, reverseIterator, reversedElements, startsWith, startsWith, endsWith, indexOfSeq, indexOfSeq, lastIndexOfSeq, lastIndexOfSeq, contains, union, diff, intersect, removeDuplicates, patch, padTo, toSequence, indices, view, view, equals, toString, sortWith, findLastIndexOf, slice, equalsWith, containsSlice, projection |
Methods inherited from PartialFunction | |
orElse, andThen |
Methods inherited from Function1 | |
compose |
Methods inherited from IterableTemplate | |
elements, foreach, foldRight, reduceRight, toIterable, head, takeRight, dropRight, sameElements, toStream, first, firstOption, toSeq |
Methods inherited from TraversableClass | |
newBuilder, genericBuilder, unzip, flatten, transpose |
Methods inherited from TraversableTemplate | |
thisCollection, nonEmpty, hasDefiniteSize, ++, ++, map, flatMap, filter, filterMap, filterNot, remove, partition, groupBy, forall, exists, count, find, foldLeft, /:, :\, reduceLeft, reduceLeftOption, reduceRightOption, headOption, tail, last, lastOption, init, take, drop, slice, takeWhile, dropWhile, span, splitAt, copyToBuffer, copyToArray, copyToArray, toArray, toList, toSet, mkString, mkString, mkString, addString, addString, addString |
Methods inherited from AnyRef | |
getClass, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Method Details |
def
length : Int
override
def
isEmpty : Boolean
IndexOutofBoundsException -
if the index is not validn
with the new element
newelem
.n -
the index of the element to replace.newelem -
the new element.IndexOutofBoundsException -
if the index is not valid
def
+:(elem : A) : JListWrapper[A]
elem -
the element to prepend.
def
+=(elem : A) : JListWrapper[A]
elem -
the element to append.
def
insertAll(i : Int, elems : Traversable[A]) : Unit
n
. Opposed to method
update
, this method will not replace an element with a
one. Instead, it will insert a new element at index n
.n -
the index where a new element will be inserted.iter -
the iterable object providing all elements to insert.IndexOutofBoundsException -
if the index is not validn -
the index which refers to the element to delete.
def
clear : Unit
def
result : JListWrapper[A]
override
def
productPrefix : java.lang.String
override
def
productArity : Int
A(x_1,...,x_k)
A(x_1,...,x_k)
, returns x_(n+1)
for 0 <= n < k
n -
the index of the element to returnIndexOutOfBoundsException -
n
elements after the first element
Scala Library
|
|