Interface ShortShortSortedPair

All Superinterfaces:
Pair<java.lang.Short,​java.lang.Short>, java.io.Serializable, ShortShortPair, SortedPair<java.lang.Short>
All Known Implementing Classes:
ShortShortImmutableSortedPair

public interface ShortShortSortedPair
extends ShortShortPair, SortedPair<java.lang.Short>, java.io.Serializable
A type-specific immutable SortedPair.
  • Method Details

    • of

      static ShortShortSortedPair of​(short left, short right)
      Returns a new type-specific immutable SortedPair with given left and right value.

      Note that if left and right are in the wrong order, they will be exchanged.

      Parameters:
      left - the left value.
      right - the right value.
      Implementation Specification:
      This factory method delegates to the factory method of the corresponding immutable implementation.
    • contains

      default boolean contains​(short e)
      Returns true if one of the two elements of this sorted pair is equal to a given element.
      Parameters:
      e - an element.
      Returns:
      true if one of the two elements of this sorted pair is equal to e.
      See Also:
      SortedPair.contains(Object)
    • contains

      @Deprecated default boolean contains​(java.lang.Object o)
      Deprecated.
      Please use the corresponding type-specific method instead.
      Returns true if one of the two elements of this sorted pair is equal to a given object.
      Specified by:
      contains in interface SortedPair<java.lang.Short>
      Parameters:
      o - an object, or null-
      Returns:
      true if one of the two elements of this sorted pair is equal to o.