
com.github.joekerouac.common.tools.collection.Pair Maven / Gradle / Ivy
The newest version!
// Generated by delombok at Fri Mar 14 11:41:38 CST 2025
/*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE
* file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
* to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package com.github.joekerouac.common.tools.collection;
/**
* 存储对
*
* @since 1.0.0
* @author JoeKerouac
* @date 2022-10-14 14:37:00
*/
public class Pair {
private KEY key;
private VALUE value;
@java.lang.SuppressWarnings("all")
@lombok.Generated
public KEY getKey() {
return this.key;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public VALUE getValue() {
return this.value;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setKey(final KEY key) {
this.key = key;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setValue(final VALUE value) {
this.value = value;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Pair)) return false;
final Pair, ?> other = (Pair, ?>) o;
if (!other.canEqual((java.lang.Object) this)) return false;
final java.lang.Object this$key = this.getKey();
final java.lang.Object other$key = other.getKey();
if (this$key == null ? other$key != null : !this$key.equals(other$key)) return false;
final java.lang.Object this$value = this.getValue();
final java.lang.Object other$value = other.getValue();
if (this$value == null ? other$value != null : !this$value.equals(other$value)) return false;
return true;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof Pair;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $key = this.getKey();
result = result * PRIME + ($key == null ? 43 : $key.hashCode());
final java.lang.Object $value = this.getValue();
result = result * PRIME + ($value == null ? 43 : $value.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public java.lang.String toString() {
return "Pair(key=" + this.getKey() + ", value=" + this.getValue() + ")";
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Pair() {
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Pair(final KEY key, final VALUE value) {
this.key = key;
this.value = value;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy