Class Endpoint<T>

java.lang.Object
org.aksw.commons.util.range.Endpoint<T>

public class Endpoint<T> extends Object
A poor-man's version of guava's internal Cut class
  • Field Details

    • value

      protected T value
    • boundType

      protected com.google.common.collect.BoundType boundType
  • Constructor Details

    • Endpoint

      public Endpoint(T value, com.google.common.collect.BoundType boundType)
  • Method Details

    • open

      public static <T> Endpoint<T> open(T value)
    • closed

      public static <T> Endpoint<T> closed(T value)
    • of

      public static <T> Endpoint<T> of(T value, com.google.common.collect.BoundType boundType)
    • getValue

      public T getValue()
    • getBoundType

      public com.google.common.collect.BoundType getBoundType()
    • toggleBoundType

      public Endpoint<T> toggleBoundType()
      Create a new endpoint with the bound type toggled. Has no effect and returns 'this' if the value is null.
    • hasValue

      public boolean hasValue()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object