001// Generated by delombok at Fri Apr 02 06:02:09 UTC 2021
002package org.projectlombok.test;
003
004// http://code.google.com/p/projectlombok/issues/detail?id=146
005//import lombok.NonNull;
006import javax.validation.constraints.NotNull;
007import javax.xml.bind.annotation.XmlEnum;
008import javax.xml.bind.annotation.XmlEnumValue;
009import javax.xml.bind.annotation.XmlType;
010import org.slf4j.Logger;
011import org.slf4j.LoggerFactory;
012
013public class AnotherDataExample implements Useful {
014        private static final Logger LOGGER = LoggerFactory.getLogger(AnotherDataExample.class);
015        //@NonNull
016        private final DataExample dataExample;
017        @NotNull
018        private final String moreInformation;
019
020        public void doSomething() {
021                LOGGER.debug("Doing something useful...");
022        }
023
024        // Example related to http://code.google.com/p/projectlombok/issues/detail?id=269
025        @XmlType
026        @XmlEnum(Integer.class)
027        public enum Coin {
028                @XmlEnumValue("1")
029                PENNY(1), @XmlEnumValue("5")
030                NICKEL(5), @XmlEnumValue("10")
031                DIME(10), @XmlEnumValue("25")
032                QUARTER(25);
033                private final int cents;
034
035                Coin(final int cents) {
036                        this.cents = cents;
037                }
038
039                public int getCents() {
040                        return cents;
041                }
042        }
043
044        @SuppressWarnings("all")
045        public AnotherDataExample(final DataExample dataExample, final String moreInformation) {
046                this.dataExample = dataExample;
047                this.moreInformation = moreInformation;
048        }
049
050        @SuppressWarnings("all")
051        public DataExample getDataExample() {
052                return this.dataExample;
053        }
054
055        @SuppressWarnings("all")
056        public String getMoreInformation() {
057                return this.moreInformation;
058        }
059
060        @Override
061        @SuppressWarnings("all")
062        public boolean equals(final Object o) {
063                if (o == this) return true;
064                if (!(o instanceof AnotherDataExample)) return false;
065                final AnotherDataExample other = (AnotherDataExample) o;
066                if (!other.canEqual((Object) this)) return false;
067                final Object this$dataExample = this.getDataExample();
068                final Object other$dataExample = other.getDataExample();
069                if (this$dataExample == null ? other$dataExample != null : !this$dataExample.equals(other$dataExample)) return false;
070                final Object this$moreInformation = this.getMoreInformation();
071                final Object other$moreInformation = other.getMoreInformation();
072                if (this$moreInformation == null ? other$moreInformation != null : !this$moreInformation.equals(other$moreInformation)) return false;
073                return true;
074        }
075
076        @SuppressWarnings("all")
077        protected boolean canEqual(final Object other) {
078                return other instanceof AnotherDataExample;
079        }
080
081        @Override
082        @SuppressWarnings("all")
083        public int hashCode() {
084                final int PRIME = 59;
085                int result = 1;
086                final Object $dataExample = this.getDataExample();
087                result = result * PRIME + ($dataExample == null ? 43 : $dataExample.hashCode());
088                final Object $moreInformation = this.getMoreInformation();
089                result = result * PRIME + ($moreInformation == null ? 43 : $moreInformation.hashCode());
090                return result;
091        }
092
093        @Override
094        @SuppressWarnings("all")
095        public String toString() {
096                return "AnotherDataExample(dataExample=" + this.getDataExample() + ", moreInformation=" + this.getMoreInformation() + ")";
097        }
098}