Record Class ImmutablePair<F,S>

java.lang.Object
java.lang.Record
top.r3944realms.superleadrope.core.util.ImmutablePair<F,S>
类型参数:
F - the type parameter
S - the type parameter

public record ImmutablePair<F,S>(F first, S second) extends Record
The type Immutable pair.
  • 构造器概要

    构造器
    构造器
    说明
    ImmutablePair(F first, S second)
    创建 ImmutablePair 记录的实例。
  • 方法概要

    修饰符和类型
    方法
    说明
    boolean
    重写equals方法
    返回 first 记录组件的值。
    final int
    返回此对象的哈希代码值。
    static <F, S> ImmutablePair<F,S>
    of(F first, S second)
    Of immutable pair.
    返回 second 记录组件的值。
    重写toString方法便于调试

    从类继承的方法 java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • 构造器详细资料

    • ImmutablePair

      public ImmutablePair(F first, S second)
      创建 ImmutablePair 记录的实例。
      参数:
      first - first 记录组件的值
      second - second 记录组件的值
  • 方法详细资料

    • of

      public static <F, S> ImmutablePair<F,S> of(F first, S second)
      Of immutable pair.
      类型参数:
      F - the type parameter
      S - the type parameter
      参数:
      first - the first
      second - the second
      返回:
      the immutable pair
    • equals

      public boolean equals(Object o)
      重写equals方法
      指定者:
      equals 在类中 Record
    • toString

      public String toString()
      重写toString方法便于调试
      指定者:
      toString 在类中 Record
    • hashCode

      public final int hashCode()
      返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。
      指定者:
      hashCode 在类中 Record
      返回:
      此对象的哈希代码值
    • first

      public F first()
      返回 first 记录组件的值。
      返回:
      first 记录组件的值
    • second

      public S second()
      返回 second 记录组件的值。
      返回:
      second 记录组件的值