Package generic

# Class End.EndDomain<N,S extends End.EndSpan<N,S>>

java.lang.Object
generic.End.EndDomain<N,S>

Type Parameters:
  `N` - the type of values
  `S` - the type of spans

All Implemented Interfaces:
  `Span.Domain<End<N>,S>`

Direct Known Subclasses:
  `FieldSpan.Domain`

Enclosing interface:
  `End<T>`

public abstract static class End.EndDomain<N,S extends End.EndSpan<N,S>> extends Object implements Span.Domain<End<N>,S>
The domain for spans of `End`

Because the domain is no longer necessarily discreet, only comparison is necessary to implement it. `dec(End)` and `inc(End)` are instead applied to the coefficient on epsilon to find connected intervals.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `EndDomain(Comparator<N> comparator)`
  Construct a domain using the given comparator

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `compare(End<N> n1, End<N> n2)`
  Compare two values
  `End<N>`
  `dec(End<N> n)`
  Get a given value, decremented by 1
  `End<N>`
  `inc(End<N> n)`
  Get a given value, incremented by 1
  `End<N>`
  `max()`
  Get the maximum value in the domain
  `End<N>`
  `min()`
  Get the minimum value in the domain
  `String`
  `toMaxString(End<N> max, Function<? super End<N>,String> nToString)`
  Render the upper bound of a span
  `String`
  `toMinString(End<N> min, Function<? super End<N>,String> nToString)`
  Render the lower bound of a span

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface generic.Span.Domain

  `all, atLeast, atMost, bound, closed, empty, encloses, intersect, intersects, max, min, newSpan, subtract, toString, toString, toString, value`

- ## Constructor Details

  - ### EndDomain

    public EndDomain(Comparator<N> comparator)
    Construct a domain using the given comparator
    Parameters:
      `comparator` - the comparator for values

- ## Method Details

  - ### toMinString

    public String toMinString(End<N> min, Function<? super End<N>,String> nToString)
    Description copied from interface: `Span.Domain`
    Render the lower bound of a span
    Specified by:
      `toMinString` in interface `Span.Domain<N,S extends End.EndSpan<N,S>>`
    Parameters:
      `min` - the lower bound
      `nToString` - a function to convert n to a string
    Returns:
      the string

  - ### toMaxString

    public String toMaxString(End<N> max, Function<? super End<N>,String> nToString)
    Description copied from interface: `Span.Domain`
    Render the upper bound of a span
    Specified by:
      `toMaxString` in interface `Span.Domain<N,S extends End.EndSpan<N,S>>`
    Parameters:
      `max` - the upper bound
      `nToString` - a function to convert n to a string
    Returns:
      the string

  - ### compare

    public int compare(End<N> n1, End<N> n2)
    Description copied from interface: `Span.Domain`
    Compare two values
    Specified by:
      `compare` in interface `Span.Domain<N,S extends End.EndSpan<N,S>>`
    Parameters:
      `n1` - a value
      `n2` - another value
    Returns:
      the result, as in `Comparator.compare(Object, Object)`

  - ### min

    public End<N> min()
    Description copied from interface: `Span.Domain`
    Get the minimum value in the domain

    This value can also represent negative infinity.

    Specified by:
      `min` in interface `Span.Domain<N,S extends End.EndSpan<N,S>>`
    Returns:
      the minimum value

  - ### max

    public End<N> max()
    Description copied from interface: `Span.Domain`
    Get the maximum value in the domain

    This value can also represent positive infinity.

    Specified by:
      `max` in interface `Span.Domain<N,S extends End.EndSpan<N,S>>`
    Returns:
      the maximum value

  - ### inc

    public End<N> inc(End<N> n)
    Description copied from interface: `Span.Domain`
    Get a given value, incremented by 1

    If the resulting value would exceed `Span.Domain.max()`, this should wrap to `Span.Domain.min()`.

    Specified by:
      `inc` in interface `Span.Domain<N,S extends End.EndSpan<N,S>>`
    Parameters:
      `n` - the value
    Returns:
      the value incremented

  - ### dec

    public End<N> dec(End<N> n)
    Description copied from interface: `Span.Domain`
    Get a given value, decremented by 1

    If the resulting value would exceed `Span.Domain.min()`, this should wrap to `Span.Domain.max()`.

    Specified by:
      `dec` in interface `Span.Domain<N,S extends End.EndSpan<N,S>>`
    Parameters:
      `n` - the value
    Returns:
      the value decremented