@OverrideEquality @Override public boolean equals(Object obj) { Equality<SubSet> equality = Equality.of(SubSet.class, this, obj); SubSet other = equality.other(); if (equality.other() == null) { return equality.returnValue(); } return Objects.equals(this.fromElement, other.fromElement) && Objects.equals(this.toElement, other.toElement); }
@OverrideEquality @Override public boolean equals(Object obj) { Equality<SubMap> equality = Equality.of(SubMap.class, this, obj); SubMap other = equality.other(); if (equality.other() == null) { return equality.returnValue(); } return Objects.equals(this.fromKey, other.fromKey) && Objects.equals(this.toKey, other.toKey); }
@OverrideEquality @Override public boolean equals(Object obj) { Equality<MemberInfo> equality = Equality.of(MemberInfo.class, this, obj); MemberInfo other = equality.other(); if (other == null) { return equality.returnValue(); } return this.declaringClass.equals(other.declaringClass) && this.member.equals(other.member); }
@OverrideEquality @Override public boolean equals(Object obj) { Equality<TailSet> equality = Equality.of(TailSet.class, this, obj); TailSet other = equality.other(); if (other == null) { return false; } return super.equals(obj) && this.inclusive == other.inclusive; }
@OverrideEquality @Override public boolean equals(Object obj) { Equality<HeadMap> equality = Equality.of(HeadMap.class, this, obj); HeadMap other = equality.other(); if (other == null) { return false; } return super.equals(obj) && this.inclusive == other.inclusive; }
@OverrideEquality @Override public boolean equals(Object obj) { Equality<HeadSet> equality = Equality.of(HeadSet.class, this, obj); HeadSet other = equality.other(); if (other == null) { return false; } return super.equals(obj) && this.inclusive == other.inclusive; }
@OverrideEquality @Override public boolean equals(Object obj) { Equality<TailMap> equality = Equality.of(TailMap.class, this, obj); TailMap other = equality.other(); if (other == null) { return false; } return super.equals(obj) && this.inclusive == other.inclusive; }
@OverrideEquality @Override public boolean equals(Object obj) { Equality<SubMap> equality = Equality.of(SubMap.class, this, obj); SubMap other = equality.other(); if (other == null) { return false; } return super.equals(obj) && this.fromInclusive == other.fromInclusive && this.toInclusive == other.toInclusive; }
@OverrideEquality @Override public boolean equals(Object obj) { Equality<SubSet> equality = Equality.of(SubSet.class, this, obj); SubSet other = equality.other(); if (other == null) { return false; } return super.equals(obj) && this.fromInclusive == other.fromInclusive && this.toInclusive == other.toInclusive; }
@OverrideEquality @Override public boolean equals(Object obj) { Equality<MethodDescriptor> equality = Equality.of(MethodDescriptor.class, this, obj); MethodDescriptor other = equality.other(); if (other == null) { return equality.returnValue(); } return this.returnType.equals(other.getReturnType()) && this.name.equals(other.getName()) && this.parameterTypes.equals(other.getParameterTypes()); }
@Override public boolean equals(Object obj) { Equality<Point2D> equality = Equality.of(Point2D.class, this, obj); Point2D other = equality.other(); if (other == null) { return equality.returnValue(); } /* * Notes: * (1) Left side of "==" can use field to optimize the performance * (2) Right side of "==" must use getter because "other" may be proxy(For example: Point2DReadOnlyProxy) */ return this.x == other.getX() && this.y == other.getY(); } }
@Override public boolean equals(Object obj) { Equality<Point3D> equality = Equality.of(Point3D.class, this, obj); Point3D other = equality.other(); if (other == null) { return equality.returnValue(); } /* * Notes: * (1) Left side of "==" can use field to optimize the performance * (2) Right side of "==" must use getter because "other" may be proxy */ return super.equals(obj) && this.z == other.getZ(); } }
@OverrideEquality @Override public boolean equals(Object obj) { Equality<Point2D> equality = Equality.of(Point2D.class, this, obj); Point2D other = equality.other(); if (other == null) { return equality.returnValue(); } /* * Notes: * (1) Left side of "==" can use field to optimize the performance * (2) Right side of "==" must use getter because "other" may be proxy(For example: Point2DReadOnlyProxy) */ return this.x == other.getX() && this.y == other.getY(); } }
@OverrideEquality @Override public boolean equals(Object obj) { Equality<Point3D> equality = Equality.of(Point3D.class, this, obj); Point3D other = equality.other(); if (other == null) { return equality.returnValue(); } /* * Notes: * (1) Left side of "==" can use field to optimize the performance * (2) Right side of "==" must use getter because "other" may be proxy */ return super.equals(obj) && this.z == other.getZ(); }
@Override public boolean equals(Object obj) { Equality<MethodImplementation> equality = Equality.of(MethodImplementation.class, this, obj); MethodImplementation other = equality.other(); if (other == null) { return equality.returnValue(); } return this.declaringClass.equals(other.getDeclaringClass()) && this.descriptor.equals(other.getDescriptor()); }