filmov
tv
SortedSet in Java | Java Collections | Collection Framework| Java Tutorial For Beginners

Показать описание
Please use the following link to install the Katalon Studio:
SortedSet is child interface of Set.
If we want to represent a group of individual objects without duplicates and all objects will be inserted according to some Sorting Order, then we should go for SortedSet.
The sorting order can be either Default Natural Sorting or Customized Sorting Order.
Alphabetical order is the Default Natural Sorting order for String objects.
Ascending order is the Default Natural Sorting order for Numbers.
Object first(): Returns first element.
Object last(): Returns last element.
SortedSet headSet(Object o): Returns SortedSet whose elements are lessthan specified object .
SortedSet tailSet(Object o): Returns SortedSet whose elements are greaterthan or = specified object .
SortedSet subSet(Object o1, Object o2): Returns SortedSet whose elements are greaterthan or = specified object1 and lessthan specified object 2.
Comparator comparator():
Returns Comparator object that describes underlying Sorting technique.
It will return null if we use Default Natural Sorting order.
SortedSet is child interface of Set.
If we want to represent a group of individual objects without duplicates and all objects will be inserted according to some Sorting Order, then we should go for SortedSet.
The sorting order can be either Default Natural Sorting or Customized Sorting Order.
Alphabetical order is the Default Natural Sorting order for String objects.
Ascending order is the Default Natural Sorting order for Numbers.
Object first(): Returns first element.
Object last(): Returns last element.
SortedSet headSet(Object o): Returns SortedSet whose elements are lessthan specified object .
SortedSet tailSet(Object o): Returns SortedSet whose elements are greaterthan or = specified object .
SortedSet subSet(Object o1, Object o2): Returns SortedSet whose elements are greaterthan or = specified object1 and lessthan specified object 2.
Comparator comparator():
Returns Comparator object that describes underlying Sorting technique.
It will return null if we use Default Natural Sorting order.