public class Equals extends Object
For how to use this class
Constructor and Description |
---|
Equals() |
Modifier and Type | Method and Description |
---|---|
static boolean |
classEqual(Object one,
Object two)
This method should be called before beginning any equals methods.
|
static boolean |
equal(boolean one,
boolean two) |
static boolean |
equal(int one,
int two) |
static boolean |
equal(long one,
long two) |
static boolean |
equal(Object one,
Object two)
Does not compare class types.
|
public Equals()
public static boolean equal(int one, int two)
public static boolean equal(long one, long two)
public static boolean equal(boolean one, boolean two)
public static boolean equal(Object one, Object two)
classEqual(Object, Object)
public static boolean classEqual(Object one, Object two)
boolean equals = false; if (EqualsHelper.classEqual(this, obj)) { TargetClass casted = (TargetClass) obj; equals = (EqualsHelper.equal(this.getId(), casted.getId()) && EqualsHelper .equal(this.getName(), casted.getName())); } return equals;
one
- The first object to testtwo
- The second object to testCopyright © 2000–2018 BioJava. All rights reserved.