001// Generated by delombok at Fri Mar 03 18:26:02 UTC 2023 002/* 003 * Licensed to the author under one or more 004 * contributor license agreements. See the NOTICE file distributed with 005 * this work for additional information regarding copyright ownership. 006 * The ASF licenses this file to You under the Apache License, Version 2.0 007 * (the "License"); you may not use this file except in compliance with 008 * the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, software 013 * distributed under the License is distributed on an "AS IS" BASIS, 014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 015 * See the License for the specific language governing permissions and 016 * limitations under the License. 017 */ 018package de.cuioss.test.generator.internal.net.java.quickcheck.collection; 019 020/** 021 * A tuple of two values. 022 * 023 * @param <A> 024 * type of first entry 025 * @param <B> 026 * type of second entry 027 */ 028public class Pair<A, B> { 029 private final A first; 030 private final B second; 031 032 @java.lang.Override 033 @java.lang.SuppressWarnings("all") 034 @lombok.Generated 035 public boolean equals(final java.lang.Object o) { 036 if (o == this) return true; 037 if (!(o instanceof Pair)) return false; 038 final Pair<?, ?> other = (Pair<?, ?>) o; 039 if (!other.canEqual((java.lang.Object) this)) return false; 040 final java.lang.Object this$first = this.getFirst(); 041 final java.lang.Object other$first = other.getFirst(); 042 if (this$first == null ? other$first != null : !this$first.equals(other$first)) return false; 043 final java.lang.Object this$second = this.getSecond(); 044 final java.lang.Object other$second = other.getSecond(); 045 if (this$second == null ? other$second != null : !this$second.equals(other$second)) return false; 046 return true; 047 } 048 049 @java.lang.SuppressWarnings("all") 050 @lombok.Generated 051 protected boolean canEqual(final java.lang.Object other) { 052 return other instanceof Pair; 053 } 054 055 @java.lang.Override 056 @java.lang.SuppressWarnings("all") 057 @lombok.Generated 058 public int hashCode() { 059 final int PRIME = 59; 060 int result = 1; 061 final java.lang.Object $first = this.getFirst(); 062 result = result * PRIME + ($first == null ? 43 : $first.hashCode()); 063 final java.lang.Object $second = this.getSecond(); 064 result = result * PRIME + ($second == null ? 43 : $second.hashCode()); 065 return result; 066 } 067 068 @java.lang.Override 069 @java.lang.SuppressWarnings("all") 070 @lombok.Generated 071 public java.lang.String toString() { 072 return "Pair(first=" + this.getFirst() + ", second=" + this.getSecond() + ")"; 073 } 074 075 @java.lang.SuppressWarnings("all") 076 @lombok.Generated 077 public Pair(final A first, final B second) { 078 this.first = first; 079 this.second = second; 080 } 081 082 @java.lang.SuppressWarnings("all") 083 @lombok.Generated 084 public A getFirst() { 085 return this.first; 086 } 087 088 @java.lang.SuppressWarnings("all") 089 @lombok.Generated 090 public B getSecond() { 091 return this.second; 092 } 093}