Interface MutablePair<F,S>

Type Parameters:
F - type of the first value
S - type of the second value
All Superinterfaces:
Pair<F,S>
All Known Implementing Classes:
MutablePair.SimpleMutablePair

public interface MutablePair<F,S> extends Pair<F,S>
Mutable Pair.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    Simple implementation of MutablePair.

    Nested classes/interfaces inherited from interface ru.progrm_jarvis.javacommons.object.Pair

    Pair.SimplePair<F,S>
  • Method Summary

    Modifier and Type
    Method
    Description
    static <F, S> @NotNull MutablePair<F,S>
    of(F first, S second)
    Creates a new mutable pair of the given values.
    void
    setFirst(F first)
    Sets the first value to the one given.
    void
    setSecond(S second)
    Sets the second value to the one given.

    Methods inherited from interface ru.progrm_jarvis.javacommons.object.Pair

    getFirst, getSecond
  • Method Details

    • setFirst

      void setFirst(F first)
      Sets the first value to the one given.
      Parameters:
      first - the value to set as the first
    • setSecond

      void setSecond(S second)
      Sets the second value to the one given.
      Parameters:
      second - the value to set as the second
    • of

      @NotNull static <F, S> @NotNull MutablePair<F,S> of(F first, S second)
      Creates a new mutable pair of the given values.
      Type Parameters:
      F - type of the first value of the pair
      S - type of the second value of the pair
      Parameters:
      first - first value of the pair
      second - second value of the pair
      Returns:
      created mutable pair of the given values