Scala Library
|
|
scala/collection/JavaConversions.scala
]
case
class
JCollectionWrapper[A](val
underlying : java.util.Collection[A])
extends
Iterable[A] with
ProductMethod Summary | |
override def
|
equals
(arg0 : Any) : Boolean
The equality method defined in `AnyRef`.
|
override def
|
hashCode
: Int
Returns a hash code value for the object.
|
override def
|
isEmpty
: Boolean
Does this iterable contain no elements?
|
def
|
iterator
: Iterator[A]
Creates a new iterator over all elements contained in this
iterable object.
|
def
|
newBuilder [B] : ArrayBuffer[B] |
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.
|
override def
|
size
: Int
The number of elements in this collection
|
Methods inherited from Product | |
productIterator, productElements |
Methods inherited from Iterable | |
companion |
Methods inherited from IterableLike | |
thisCollection, toCollection, elements, foreach, forall, exists, find, foldRight, reduceRight, toIterable, head, take, slice, takeWhile, takeRight, dropRight, copyToArray, zip, zipAll, zipWithIndex, sameElements, toStream, canEqual, view, view, first, firstOption, projection |
Methods inherited from GenericTraversableTemplate | |
newBuilder, genericBuilder, unzip, flatten, transpose |
Methods inherited from TraversableLike | |
repr, nonEmpty, hasDefiniteSize, ++, ++, map, flatMap, filter, filterNot, partialMap, remove, partition, groupBy, count, foldLeft, /:, :\, reduceLeft, reduceLeftOption, reduceRightOption, sum, product, min, max, headOption, tail, last, lastOption, init, drop, dropWhile, span, splitAt, copyToBuffer, copyToArray, toArray, toList, toSeq, toIndexedSeq, toSet, mkString, mkString, mkString, addString, addString, addString, toString, stringPrefix, withFilter |
Methods inherited from AnyRef | |
getClass, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Method Details |
override
def
size : Int
override
def
isEmpty : Boolean
def
newBuilder[B] : ArrayBuffer[B]
override
def
hashCode : Int
The default hashing algorithm is platform dependent.
Note that it is allowed for two objects to have identical hash
codes (o1.hashCode.equals(o2.hashCode)
) yet not be
equal (o1.equals(o2)
returns false
). A
degenerate implementation could always return 0
.
However, it is required that if two objects are equal
(o1.equals(o2)
returns true
) that they
have identical hash codes
(o1.hashCode.equals(o2.hashCode)
). Therefore, when
overriding this method, be sure to verify that the behavior is
consistent with the equals
method.
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
|
|