Class CharSortedSets.SynchronizedSortedSet
- java.lang.Object
-
- it.unimi.dsi.fastutil.chars.CharCollections.SynchronizedCollection
-
- it.unimi.dsi.fastutil.chars.CharSets.SynchronizedSet
-
- it.unimi.dsi.fastutil.chars.CharSortedSets.SynchronizedSortedSet
-
- All Implemented Interfaces:
CharBidirectionalIterable,CharCollection,CharIterable,CharSet,CharSortedSet,Serializable,Iterable<Character>,Collection<Character>,Set<Character>,SortedSet<Character>
- Enclosing class:
- CharSortedSets
public static class CharSortedSets.SynchronizedSortedSet extends CharSets.SynchronizedSet implements CharSortedSet, Serializable
A synchronized wrapper class for sorted sets.- See Also:
- Serialized Form
-
-
Method Summary
Modifier and Type Method Description CharComparatorcomparator()Characterfirst()Deprecated.Please use the corresponding type-specific method instead.charfirstChar()Returns the first (lowest) element currently in this set.CharSortedSetheadSet(char to)Returns a view of the portion of this sorted set whose elements are strictly less thantoElement.CharSortedSetheadSet(Character to)Deprecated.Please use the corresponding type-specific method instead.CharBidirectionalIteratoriterator()Returns a type-specific iterator on the elements of this collection.CharBidirectionalIteratoriterator(char from)Returns a type-specificBidirectionalIteratoron the elements in this set, starting from a given element of the domain (optional operation).Characterlast()Deprecated.Please use the corresponding type-specific method instead.charlastChar()Returns the last (highest) element currently in this set.CharSortedSetsubSet(char from, char to)Returns a view of the portion of this sorted set whose elements range fromfromElement, inclusive, totoElement, exclusive.CharSortedSetsubSet(Character from, Character to)Deprecated.Please use the corresponding type-specific method instead.CharSortedSettailSet(char from)Returns a view of the portion of this sorted set whose elements are greater than or equal tofromElement.CharSortedSettailSet(Character from)Deprecated.Please use the corresponding type-specific method instead.-
Methods inherited from class it.unimi.dsi.fastutil.chars.CharSets.SynchronizedSet
rem, remove
-
Methods inherited from class it.unimi.dsi.fastutil.chars.CharCollections.SynchronizedCollection
add, add, addAll, addAll, clear, contains, contains, containsAll, containsAll, equals, hashCode, isEmpty, remove, removeAll, removeAll, removeIf, retainAll, retainAll, size, toArray, toArray, toArray, toCharArray, toCharArray, toString
-
Methods inherited from interface it.unimi.dsi.fastutil.chars.CharCollection
add, addAll, contains, containsAll, removeAll, removeIf, removeIf, retainAll, toArray, toCharArray, toCharArray
-
Methods inherited from interface it.unimi.dsi.fastutil.chars.CharIterable
forEach, forEach
-
Methods inherited from interface it.unimi.dsi.fastutil.chars.CharSet
add, contains, rem, remove, remove
-
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
-
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, size, toArray, toArray
-
Methods inherited from interface java.util.SortedSet
spliterator
-
-
-
-
Method Detail
-
comparator
public CharComparator comparator()
Description copied from interface:CharSortedSetNote that this specification strengthens the one given in
SortedSet.comparator().- Specified by:
comparatorin interfaceCharSortedSet- Specified by:
comparatorin interfaceSortedSet<Character>
-
subSet
public CharSortedSet subSet(char from, char to)
Description copied from interface:CharSortedSetReturns a view of the portion of this sorted set whose elements range fromfromElement, inclusive, totoElement, exclusive.Note that this specification strengthens the one given in
SortedSet.subSet(Object,Object).- Specified by:
subSetin interfaceCharSortedSet- See Also:
SortedSet.subSet(Object,Object)
-
headSet
public CharSortedSet headSet(char to)
Description copied from interface:CharSortedSetReturns a view of the portion of this sorted set whose elements are strictly less thantoElement.Note that this specification strengthens the one given in
SortedSet.headSet(Object).- Specified by:
headSetin interfaceCharSortedSet- See Also:
SortedSet.headSet(Object)
-
tailSet
public CharSortedSet tailSet(char from)
Description copied from interface:CharSortedSetReturns a view of the portion of this sorted set whose elements are greater than or equal tofromElement.Note that this specification strengthens the one given in
SortedSet.headSet(Object).- Specified by:
tailSetin interfaceCharSortedSet- See Also:
SortedSet.tailSet(Object)
-
iterator
public CharBidirectionalIterator iterator()
Description copied from interface:CharCollectionReturns a type-specific iterator on the elements of this collection.Note that this specification strengthens the one given in
Iterable.iterator(), which was already strengthened in the corresponding type-specific class, but was weakened by the fact that this interface extendsCollection.- Specified by:
iteratorin interfaceCharBidirectionalIterable- Specified by:
iteratorin interfaceCharCollection- Specified by:
iteratorin interfaceCharIterable- Specified by:
iteratorin interfaceCharSet- Specified by:
iteratorin interfaceCharSortedSet- Specified by:
iteratorin interfaceCollection<Character>- Specified by:
iteratorin interfaceIterable<Character>- Specified by:
iteratorin interfaceSet<Character>- Overrides:
iteratorin classCharCollections.SynchronizedCollection- Returns:
- a type-specific iterator on the elements of this collection.
- See Also:
Iterable.iterator()
-
iterator
public CharBidirectionalIterator iterator(char from)
Description copied from interface:CharSortedSetReturns a type-specificBidirectionalIteratoron the elements in this set, starting from a given element of the domain (optional operation).This method returns a type-specific bidirectional iterator with given starting point. The starting point is any element comparable to the elements of this set (even if it does not actually belong to the set). The next element of the returned iterator is the least element of the set that is greater than the starting point (if there are no elements greater than the starting point,
hasNext()will returnfalse). The previous element of the returned iterator is the greatest element of the set that is smaller than or equal to the starting point (if there are no elements smaller than or equal to the starting point,hasPrevious()will returnfalse).Note that passing the last element of the set as starting point and calling
previous()you can traverse the entire set in reverse order.- Specified by:
iteratorin interfaceCharSortedSet- Parameters:
from- an element to start from.- Returns:
- a bidirectional iterator on the element in this set, starting at the given element.
-
firstChar
public char firstChar()
Description copied from interface:CharSortedSetReturns the first (lowest) element currently in this set.- Specified by:
firstCharin interfaceCharSortedSet- See Also:
SortedSet.first()
-
lastChar
public char lastChar()
Description copied from interface:CharSortedSetReturns the last (highest) element currently in this set.- Specified by:
lastCharin interfaceCharSortedSet- See Also:
SortedSet.last()
-
first
@Deprecated public Character first()
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
firstin interfaceCharSortedSet- Specified by:
firstin interfaceSortedSet<Character>
-
last
@Deprecated public Character last()
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
lastin interfaceCharSortedSet- Specified by:
lastin interfaceSortedSet<Character>
-
subSet
@Deprecated public CharSortedSet subSet(Character from, Character to)
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
subSetin interfaceCharSortedSet- Specified by:
subSetin interfaceSortedSet<Character>
-
headSet
@Deprecated public CharSortedSet headSet(Character to)
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
headSetin interfaceCharSortedSet- Specified by:
headSetin interfaceSortedSet<Character>
-
tailSet
@Deprecated public CharSortedSet tailSet(Character from)
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
tailSetin interfaceCharSortedSet- Specified by:
tailSetin interfaceSortedSet<Character>
-
-