com.ijchart.xychart.util
Class EqualsUtil

java.lang.Object
  extended by com.ijchart.xychart.util.EqualsUtil

public abstract class EqualsUtil
extends java.lang.Object

Title: IJChart

Description: a chart library for the Java(tm) platform.

Utilise class form object compare.

Copyright: Copyright (c) 2013

Company:

Version:
1.0
Author:
zhang feng min,shanghai china. Contract me by email.

Constructor Summary
EqualsUtil()
           
 
Method Summary
static boolean equals(java.awt.geom.Arc2D a1, java.awt.geom.Arc2D a2)
           Compares two arcs and returns true if they are equal or both null.
static boolean equals(double num1, double num2, double delta)
           Compare that two doubles are equal concerning a delta.
static boolean equals(java.awt.geom.Ellipse2D e1, java.awt.geom.Ellipse2D e2)
           Compares two ellipses and returns true if they are equal or both null.
static boolean equals(java.awt.geom.GeneralPath p1, java.awt.geom.GeneralPath p2)
           Tests two GeneralPath for equality.
static boolean equals(java.awt.Image image1, java.awt.Image image2)
           Compares two image are returns true if they are equal or both null.
static boolean equals(java.awt.geom.Line2D l1, java.awt.geom.Line2D l2)
           Compares two lines are returns true if they are equal or both null.
static boolean equals(java.util.List list1, java.util.List list2)
           Test if two List whether or not equal.
static boolean equals(java.lang.Object[] array1, java.lang.Object[] array2)
           Test if two object array whether or not equal.
static boolean equals(java.lang.Object obj1, java.lang.Object obj2)
           Compare two object whether or not equal.
static boolean equals(java.awt.Paint p1, java.awt.Paint p2)
           Returns true if the two Paint objects are equal OR both null.This method handles GradientPaint as a special case.
static boolean equals(java.awt.Polygon p1, java.awt.Polygon p2)
           Tests two polygons for equality.
static boolean equals(java.awt.Shape s1, java.awt.Shape s2)
           Tests two shapes for equality.
static boolean equalsPaintMap(java.util.Map map1, java.util.Map map2)
           Tests two maps containing (object, Paint) elements for equality.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EqualsUtil

public EqualsUtil()
Method Detail

equals

public static boolean equals(java.awt.Paint p1,
                             java.awt.Paint p2)
Returns true if the two Paint objects are equal OR both null.This method handles GradientPaint as a special case.

Parameters:
p1 - paint 1 (null permitted).
p2 - paint 2 (null permitted).
Returns:
A boolean.

equals

public static boolean equals(java.awt.Shape s1,
                             java.awt.Shape s2)
Tests two shapes for equality. If both shapes are null, this method will return true.

In the current implementation, the following shapes are supported: Ellipse2D, Line2D and Rectangle2D (implicit).

Parameters:
s1 - The first shape (null permitted).
s2 - The second shape (null permitted).
Returns:
A boolean.

equals

public static boolean equals(java.awt.geom.Line2D l1,
                             java.awt.geom.Line2D l2)
Compares two lines are returns true if they are equal or both null.

Parameters:
l1 - The first line (null permitted).
l2 - The second line (null permitted).
Returns:
A boolean.

equals

public static boolean equals(java.awt.geom.Ellipse2D e1,
                             java.awt.geom.Ellipse2D e2)
Compares two ellipses and returns true if they are equal or both null.

Parameters:
e1 - The first ellipse (null permitted).
e2 - The second ellipse (null permitted).
Returns:
A boolean.

equals

public static boolean equals(java.awt.geom.Arc2D a1,
                             java.awt.geom.Arc2D a2)
Compares two arcs and returns true if they are equal or both null.

Parameters:
a1 - The first arc (null permitted).
a2 - The second arc (null permitted).
Returns:
A boolean.

equals

public static boolean equals(java.awt.Polygon p1,
                             java.awt.Polygon p2)
Tests two polygons for equality. If both are null this method returns true.

Parameters:
p1 - polygon 1 (null permitted).
p2 - polygon 2 (null permitted).
Returns:
A boolean.

equals

public static boolean equals(java.awt.geom.GeneralPath p1,
                             java.awt.geom.GeneralPath p2)
Tests two GeneralPath for equality. If both are null this method returns true.

Parameters:
p1 - path 1 (null permitted).
p2 - path 2 (null permitted).
Returns:
A boolean.

equals

public static boolean equals(java.awt.Image image1,
                             java.awt.Image image2)
Compares two image are returns true if they are equal or both null.

Parameters:
image1 - The first image (null permitted).
image2 - The second image (null permitted).
Returns:
A boolean. Returns true if the two image width and height are equal,otherwise return false.

equals

public static boolean equals(java.lang.Object obj1,
                             java.lang.Object obj2)
Compare two object whether or not equal.

Parameters:
obj1 - Object
obj2 - Object
Returns:
boolean If the two object equals return true,else return false.

equals

public static boolean equals(double num1,
                             double num2,
                             double delta)
Compare that two doubles are equal concerning a delta.

Parameters:
num1 - double
num2 - double
delta - double The delta.
Returns:
boolean

equals

public static boolean equals(java.util.List list1,
                             java.util.List list2)
Test if two List whether or not equal.

Parameters:
list1 - List
list2 - List
Returns:
boolean If equal return true,else return false.

equals

public static boolean equals(java.lang.Object[] array1,
                             java.lang.Object[] array2)
Test if two object array whether or not equal.

Parameters:
array1 - Object[]
array2 - Object[]
Returns:
boolean If equal return true,else return false.

equalsPaintMap

public static boolean equalsPaintMap(java.util.Map map1,
                                     java.util.Map map2)
Tests two maps containing (object, Paint) elements for equality.

Parameters:
map1 - The first map (null permitted).
map2 - The second map (null permitted).
Returns:
A boolean.