# Tag Archives: Scala Mutable-SortedMap

The exists() method is utilized to check if the given predicate satisfy the elements of the SortedMap or not. Method Definition: def exists(p: ((A, B))… Read More
The filter() method is utilized to select all elements of the SortedMap which satisfies a stated predicate. Method Definition: def filter(p: ((A, B))=> Boolean): SortedMap[A,… Read More
The filterKeys() method is utilized to find all the pairs where the keys satisfies the given predicate. Method Definition: def filterKeys(p: (A) => Boolean): SortedMap[A,… Read More
The find() method is utilized to find the first element of the SortedMap that satisfies the given predicate. Method Definition: def find(p: ((A, B)) =>… Read More
The foreach() method is utilized to apply the given function to all the elements of the SortedMap. Method Definition: def foreach(f: ((A, B)) => Unit):… Read More
The isEmpty() method is utilized to check if the given SortedMap is empty or not. Method Definition: def isEmpty: Boolean Return Type: It returns true… Read More
The keys() method is utilized to give an iterator over all the keys of the SortedMap. Method Definition: def keys: Iterable[A] Return Type: It returns… Read More
The max() method is utilized to find the largest element of the SortedMap. Method Definition: def max: (A, B) Return Type: It returns the largest… Read More
The copyToArray() method is utilized in copying pair of keys of the SortedMap to an Array. Method Definition: def copyToArray(xs: Array[(A, B)]): Unit Return Type:… Read More
The dropRight() method is utilized to delete the last ‘n’ elements. Method Definition: def dropRight(n: Int): SortedMap[A, B] Return Type: It returns all the elements… Read More
The size() is utilized to find the number of key-value pairs in the stated SortedMap. Method Definition: def size: Int Return Type: It returns the… Read More
The toSet() method is utilized to display a set from the Scala SortedMap. Method Definition: def toSet: Set[A] Return Type: It returns a set from… Read More
The contains() method of Scala is equivalent to the isDefinedAt method of Scala but the only difference is that isDefinedAt is observed on all the… Read More
The apply() is utilized to search a key in the stated SortedMap. Method Definition: m1.apply(“key”) Here m1 is SortedMap. Return Type: It returns the value… Read More
This method is identical to the addString() method but here a separator is also included. Method Definition: def addString(b: StringBuilder, sep: String): StringBuilder Where, sep… Read More