-
Notifications
You must be signed in to change notification settings - Fork 4
Preference Page Settings results explained
Alex edited this page Jul 15, 2015
·
3 revisions
package net.sf.guavaeclipse.test;
import com.google.common.base.MoreObjects;
public class SampleSimple {
private int intValue;
private String strValue;
@Override
public String toString() {
return MoreObjects.toStringHelper(this)
.add("intValue", intValue)
.add("strValue", strValue)
.toString();
}
}
package net.sf.guavaeclipse.test;
import com.google.common.base.Objects;
public class SampleSimple {
private int intValue;
private String strValue;
@Override
public String toString() {
return Objects.toStringHelper(this)
.add("intValue", intValue)
.add("strValue", strValue)
.toString();
}
}
package net.sf.guavaeclipse.test;
import com.google.common.base.Objects;
import com.google.common.base.MoreObjects;
public class SampleSimple {
private int intValue;
private String strValue;
@Override
public String toString() {
return MoreObjects.toStringHelper(this)
.add("super", super.toString())
.add("intValue", intValue)
.add("strValue", strValue)
.toString();
}
@Override
public int hashCode() {
return Objects.hashCode(super.hashCode(), intValue, strValue);
}
@Override
public boolean equals(Object object) {
if (object instanceof SampleSimple) {
if (!super.equals(object))
return false;
SampleSimple that = (SampleSimple) object;
return Objects.equal(this.intValue, that.intValue)
&& Objects.equal(this.strValue, that.strValue);
}
return false;
}
}
package net.sf.guavaeclipse.test;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
public class ClassExtendsSomeComparable extends ClassWithComparable {
private int intValue2;
public int getIntValue2() {
return intValue2;
}
public void setIntValue2(int intValue2) {
this.intValue2 = intValue2;
}
@Override
public String toString() {
return MoreObjects.toStringHelper(this).add("intValue2", intValue2).toString();
}
@Override
public int hashCode() {
return Objects.hashCode(intValue2);
}
@Override
public boolean equals(Object object) {
if (object instanceof ClassExtendsSomeComparable) {
ClassExtendsSomeComparable that = (ClassExtendsSomeComparable) object;
return Objects.equal(this.intValue2, that.intValue2);
}
return false;
}
}
package net.sf.guavaeclipse.test;
import com.google.common.base.Objects;
import com.google.common.base.MoreObjects;
public class SampleSimple {
private int intValue;
private String strValue;
@Override
public String toString() {
return MoreObjects.toStringHelper(this).add("intValue", intValue).add("strValue", strValue)
.toString();
}
@Override
public int hashCode() {
return Objects.hashCode(intValue, strValue);
}
@Override
public boolean equals(Object object) {
if (object instanceof SampleSimple) {
SampleSimple that = (SampleSimple) object;
return Objects.equal(this.intValue, that.intValue)
&& Objects.equal(this.strValue, that.strValue);
}
return false;
}
}
package net.sf.guavaeclipse.test;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
public class ClassExtendsSomeComparable extends ClassWithComparable {
private int intValue2;
public int getIntValue2() {
return intValue2;
}
public void setIntValue2(int intValue2) {
this.intValue2 = intValue2;
}
@Override
public String toString() {
return MoreObjects.toStringHelper(this).add("super", super.toString())
.add("intValue2", intValue2).toString();
}
@Override
public int hashCode() {
return Objects.hashCode(super.hashCode(), intValue2);
}
@Override
public boolean equals(Object object) {
if (object instanceof ClassExtendsSomeComparable) {
if (!super.equals(object))
return false;
ClassExtendsSomeComparable that = (ClassExtendsSomeComparable) object;
return Objects.equal(this.intValue2, that.intValue2);
}
return false;
}
}