Package generic

Class Span.SpanMapSetter<E,N,S extends Span<N,S>,V>

java.lang.Object
generic.RangeMapSetter<E,N,S,V>
generic.Span.SpanMapSetter<E,N,S,V>
Type Parameters:
E - the type of entries in the Span.SpanMap implementation
N - the type of endpoints
S - the type of spans
V - the type of values
Enclosing interface:
Span<N,S extends Span<N,S>>

public abstract static class Span.SpanMapSetter<E,N,S extends Span<N,S>,V> extends RangeMapSetter<E,N,S,V>
A partial implementation of RangeMapSetter for Spans.
  • Constructor Details

    • SpanMapSetter

      public SpanMapSetter()
  • Method Details

    • domain

      protected abstract Span.Domain<N,S> domain()
      Get the domain of the spans
      Returns:
      the domain
    • compare

      protected int compare(N d1, N d2)
      Description copied from class: RangeMapSetter
      Compare two values as in Comparator.compare(Object, Object)
      Specified by:
      compare in class RangeMapSetter<E,N,S extends Span<N,S>,V>
      Parameters:
      d1 - the first value
      d2 - the second value
      Returns:
      the result
    • getLower

      protected N getLower(S range)
      Description copied from class: RangeMapSetter
      Get the lower bound of the range
      Specified by:
      getLower in class RangeMapSetter<E,N,S extends Span<N,S>,V>
      Parameters:
      range - the range
      Returns:
      the lower bound
    • getUpper

      protected N getUpper(S range)
      Description copied from class: RangeMapSetter
      Get the upper bound of the range
      Specified by:
      getUpper in class RangeMapSetter<E,N,S extends Span<N,S>,V>
      Parameters:
      range - the range
      Returns:
      the upper bound
    • toSpan

      protected S toSpan(N lower, N upper)
      Description copied from class: RangeMapSetter
      Create a closed range with the given bounds
      Specified by:
      toSpan in class RangeMapSetter<E,N,S extends Span<N,S>,V>
      Parameters:
      lower - the lower bound
      upper - the upper bound
      Returns:
      the range
    • getPrevious

      protected N getPrevious(N d)
      Description copied from class: RangeMapSetter
      Get the number immediately preceding the given bound
      Specified by:
      getPrevious in class RangeMapSetter<E,N,S extends Span<N,S>,V>
      Parameters:
      d - the bound
      Returns:
      the previous bound, or null if it doesn't exist
    • getNext

      protected N getNext(N d)
      Description copied from class: RangeMapSetter
      Get the number immediately following the given bound
      Specified by:
      getNext in class RangeMapSetter<E,N,S extends Span<N,S>,V>
      Parameters:
      d - the bound
      Returns:
      the next bound, or null if it doesn't exist