org.geotools.util
Class EqualsUtil

java.lang.Object
  extended by org.geotools.util.EqualsUtil

Deprecated. Use Utilities instead.

@Deprecated
public final class EqualsUtil
extends java.lang.Object

Collected methods which allow easy implementation of equals. Example use case in a class called Car:

public boolean equals(Object aThat){
  if ( this == aThat ) return true;
  if ( !(aThat instanceof Car) ) return false;
  Car that = (Car)aThat;
  return
    EqualsUtil.equals(this.fName, that.fName) &&
    EqualsUtil.equals(this.fNumDoors, that.fNumDoors) &&
    EqualsUtil.equals(this.fGasMileage, that.fGasMileage) &&
    EqualsUtil.equals(this.fColor, that.fColor) &&
    Arrays.equals(this.fMaintenanceChecks, that.fMaintenanceChecks); //array!
}
 
Arrays are not handled by this class. This is because the Arrays.equals methods should be used for array fields.


Constructor Summary
EqualsUtil()
          Deprecated.  
 
Method Summary
static boolean equals(boolean o1, boolean o2)
          Deprecated.  
static boolean equals(char o1, char o2)
          Deprecated.  
static boolean equals(double o1, double o2)
          Deprecated.  
static boolean equals(float o1, float o2)
          Deprecated.  
static boolean equals(long o1, long o2)
          Deprecated.  
static boolean equals(java.lang.Object o1, java.lang.Object o2)
          Deprecated. Possibly-null object field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EqualsUtil

public EqualsUtil()
Deprecated. 
Method Detail

equals

public static boolean equals(boolean o1,
                             boolean o2)
Deprecated. 

equals

public static boolean equals(char o1,
                             char o2)
Deprecated. 

equals

public static boolean equals(long o1,
                             long o2)
Deprecated. 

equals

public static boolean equals(float o1,
                             float o2)
Deprecated. 

equals

public static boolean equals(double o1,
                             double o2)
Deprecated. 

equals

public static boolean equals(java.lang.Object o1,
                             java.lang.Object o2)
Deprecated. 
Possibly-null object field. Includes type-safe enumerations and collections, but does not include arrays. See class comment.



Copyright © 1996-2010 Geotools. All Rights Reserved.