Class ConverterCollections.ConverterSortedSet<F,T>

Type Parameters:
F - the type of elements in the underlying SortedSet
T - the type that the elements should be converted to
All Implemented Interfaces:
Serializable, Iterable<T>, Collection<T>, SequencedCollection<T>, SequencedSet<T>, Set<T>, SortedSet<T>
Enclosing class:
ConverterCollections

public static class ConverterCollections.ConverterSortedSet<F,T> extends ConverterCollections.ConverterSet<F,T> implements SortedSet<T>, Serializable
A Converter SortedSet views an underlying SortedSet through a Converter.
See Also:
  • Constructor Details

    • ConverterSortedSet

      public ConverterSortedSet(SortedSet<F> set, Converter<F,T> convUp, Converter<T,F> convDown)
      Constructor.
      Parameters:
      set - the underlying SortedSet
      convUp - the Converter from the underlying SortedSet
      convDown - the Converter to the underlying SortedSet
  • Method Details

    • comparator

      public Comparator<T> comparator()
      Specified by:
      comparator in interface SortedSet<F>
    • subSet

      public SortedSet<T> subSet(T fromElement, T toElement)
      Specified by:
      subSet in interface SortedSet<F>
    • headSet

      public SortedSet<T> headSet(T toElement)
      Specified by:
      headSet in interface SortedSet<F>
    • tailSet

      public SortedSet<T> tailSet(T fromElement)
      Specified by:
      tailSet in interface SortedSet<F>
    • first

      public T first()
      Specified by:
      first in interface SortedSet<F>
    • last

      public T last()
      Specified by:
      last in interface SortedSet<F>
    • instantiateSortedSet

      protected SortedSet<T> instantiateSortedSet(SortedSet<F> set, Converter<F,T> convUp, Converter<T,F> convDown)
      Create a Converter SortedSet.
      Parameters:
      set - the underlying SortedSet
      convUp - the Converter to view the underlying SortedSet through
      convDown - the Converter to pass items down to the underlying SortedSet through
      Returns:
      a Converter SortedSet
    • getSortedSet

      public SortedSet<F> getSortedSet()
      Return the underlying SortedSet.
      Returns:
      the underlying SortedSet