001// Generated by delombok at Fri Apr 02 06:02:09 UTC 2021 002package org.projectlombok.test; 003 004import org.slf4j.Logger; 005import org.slf4j.LoggerFactory; 006 007public class DataExample { 008 private static final Logger LOGGER = LoggerFactory.getLogger(DataExample.class); 009 private final String name; 010 private int age; 011 private double score; 012 private String[] tags; 013 014 015 public static class Exercise<T> { 016 private final String name; 017 private final T value; 018 019 @Override 020 @SuppressWarnings("all") 021 public String toString() { 022 return "DataExample.Exercise(name=" + this.getName() + ", value=" + this.getValue() + ")"; 023 } 024 025 @SuppressWarnings("all") 026 private Exercise(final String name, final T value) { 027 this.name = name; 028 this.value = value; 029 } 030 031 @SuppressWarnings("all") 032 public static <T> DataExample.Exercise<T> of(final String name, final T value) { 033 return new DataExample.Exercise<T>(name, value); 034 } 035 036 @SuppressWarnings("all") 037 public String getName() { 038 return this.name; 039 } 040 041 @SuppressWarnings("all") 042 public T getValue() { 043 return this.value; 044 } 045 046 @Override 047 @SuppressWarnings("all") 048 public boolean equals(final Object o) { 049 if (o == this) return true; 050 if (!(o instanceof DataExample.Exercise)) return false; 051 final DataExample.Exercise<?> other = (DataExample.Exercise<?>) o; 052 if (!other.canEqual((Object) this)) return false; 053 final Object this$name = this.getName(); 054 final Object other$name = other.getName(); 055 if (this$name == null ? other$name != null : !this$name.equals(other$name)) return false; 056 final Object this$value = this.getValue(); 057 final Object other$value = other.getValue(); 058 if (this$value == null ? other$value != null : !this$value.equals(other$value)) return false; 059 return true; 060 } 061 062 @SuppressWarnings("all") 063 protected boolean canEqual(final Object other) { 064 return other instanceof DataExample.Exercise; 065 } 066 067 @Override 068 @SuppressWarnings("all") 069 public int hashCode() { 070 final int PRIME = 59; 071 int result = 1; 072 final Object $name = this.getName(); 073 result = result * PRIME + ($name == null ? 43 : $name.hashCode()); 074 final Object $value = this.getValue(); 075 result = result * PRIME + ($value == null ? 43 : $value.hashCode()); 076 return result; 077 } 078 } 079 080 @SuppressWarnings("all") 081 public DataExample(final String name) { 082 this.name = name; 083 } 084 085 @SuppressWarnings("all") 086 public String getName() { 087 return this.name; 088 } 089 090 @SuppressWarnings("all") 091 public int getAge() { 092 return this.age; 093 } 094 095 @SuppressWarnings("all") 096 public double getScore() { 097 return this.score; 098 } 099 100 @SuppressWarnings("all") 101 public String[] getTags() { 102 return this.tags; 103 } 104 105 @SuppressWarnings("all") 106 public void setScore(final double score) { 107 this.score = score; 108 } 109 110 @SuppressWarnings("all") 111 public void setTags(final String[] tags) { 112 this.tags = tags; 113 } 114 115 @Override 116 @SuppressWarnings("all") 117 public boolean equals(final Object o) { 118 if (o == this) return true; 119 if (!(o instanceof DataExample)) return false; 120 final DataExample other = (DataExample) o; 121 if (!other.canEqual((Object) this)) return false; 122 if (this.getAge() != other.getAge()) return false; 123 if (Double.compare(this.getScore(), other.getScore()) != 0) return false; 124 final Object this$name = this.getName(); 125 final Object other$name = other.getName(); 126 if (this$name == null ? other$name != null : !this$name.equals(other$name)) return false; 127 if (!java.util.Arrays.deepEquals(this.getTags(), other.getTags())) return false; 128 return true; 129 } 130 131 @SuppressWarnings("all") 132 protected boolean canEqual(final Object other) { 133 return other instanceof DataExample; 134 } 135 136 @Override 137 @SuppressWarnings("all") 138 public int hashCode() { 139 final int PRIME = 59; 140 int result = 1; 141 result = result * PRIME + this.getAge(); 142 final long $score = Double.doubleToLongBits(this.getScore()); 143 result = result * PRIME + (int) ($score >>> 32 ^ $score); 144 final Object $name = this.getName(); 145 result = result * PRIME + ($name == null ? 43 : $name.hashCode()); 146 result = result * PRIME + java.util.Arrays.deepHashCode(this.getTags()); 147 return result; 148 } 149 150 @Override 151 @SuppressWarnings("all") 152 public String toString() { 153 return "DataExample(name=" + this.getName() + ", age=" + this.getAge() + ", score=" + this.getScore() + ", tags=" + java.util.Arrays.deepToString(this.getTags()) + ")"; 154 } 155 156 @SuppressWarnings("all") 157 void setAge(final int age) { 158 this.age = age; 159 } 160}