Skip to content

Tag Archives: scala-collection

The mkString() method is utilized to display all elements of the TreeSet in a string. Method Definition: def mkString: String Return Type: It returns a… Read More
The isEmpty() is utilized to check if the TreeSet is empty or not. Method Definition: def isEmpty: Boolean Return Type: It returns true if the… Read More
The last() method is utilized to return the last element of the TreeSet. Method Definition: def last: A Return Type: It returns the last element… Read More
The map() method is utilized to build a new TreeSet by applying a function to all elements of the given TreeSet. Method Definition: def map[B](f:… Read More
The max() method is utilized to return the largest method of the TreeSet. Method Definition: def max: A Return Type: It returns the largest element… Read More
The min() method is utilized to return the smallest element of the TreeSet. Method Definition: def min: A Return Type: It returns the smallest element… Read More
The diff() method is used to find the difference between the two TreeSet. It deletes elements that are present in one TreeSet from the other… Read More
In Scala TreeSet class, the copyToArray() method is utilized in copying the elements of the TreeSet to an Array. Method Definition: def copyToArray[B >: A](xs:… Read More
The head() method is utilized return the first element of the queue. Method Definition: def head: A Return Type: It returns the first element of… Read More
The reverse() method is utilized to return a queue with the reverse order. Method Definition: def reverse: Queue[A] Return Type: It returns a queue with… Read More
The toString() method is utilized to return a string representation of the queue object. Method Definition: def toString(): String Return Type: It returns a string… Read More
The toSeq() method is utilized to return a seq consisting of all the elements of the queue. Method Definition: def toSeq: Seq[A] Return Type: It… Read More
The toMap() method is utilized to return a map consisting of all the elements of the queue. Method Definition: def toMap[T, U]: Map[T, U] Return… Read More
The toList() method is utilized to return a list consisting of all the elements of the queue. Method Definition: def toList: List[A] Return Type: It… Read More
The toBuffer() method is utilized to return a buffer consisting of all the elements of the queue. Method Definition: def toBuffer[B >: A]: Buffer[B] Return… Read More