net.sf.jasperreports.engine.util

## Class ObjectUtils

- java.lang.Object
- - net.sf.jasperreports.engine.util.ObjectUtils

-     public class ObjectUtils
      extends java.lang.Object

  Object comparison and hashing utilities.
  Version:
    $Id: ObjectUtils.java 5878 2013-01-07 20:23:13Z teodord $
  Author:
    Lucian Chirita (lucianc@users.sourceforge.net)

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ObjectUtils.HashCode` Hash code creator for objects.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ObjectUtils()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `equals(boolean b1, boolean b2)` Determines whether two boolean values are equal.
    `static <T extends java.lang.Enum<T>> boolean` | `equals(java.lang.Enum<T> o1, java.lang.Enum<T> o2)` Determines whether two enum values are equal.
    `static boolean` | `equals(int i1, int i2)` Determines whether two integer values are equal.
    `static boolean` | `equals(JRPropertiesMap p1, JRPropertiesMap p2)` Determines whether two property sets are identical.
    `static boolean` | `equals(java.lang.Object o1, java.lang.Object o2)` Determines whether two objects are equal, including `null` values.
    `static boolean` | `equalsIdentity(java.lang.Object o1, java.lang.Object o2)` Determines whether two objects are the same as instances.
    `static ObjectUtils.HashCode` | `hash()` Returns a fresh hash code creator.
    `static boolean` | `identical(java.util.List<?> l1, java.util.List<?> l2)` Determines whether two lists of objects are identical.
    `static boolean` | `identical(java.lang.Object[] v1, java.lang.Object[] v2)` Determines whether two arrays of objects are identical.
    `static boolean` | `identical(java.lang.Object o1, java.lang.Object o2)` Determines whether two objects are identical.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ObjectUtils

          public ObjectUtils()

  - ### Method Detail

    - #### hash

          public static ObjectUtils.HashCode hash()

      Returns a fresh hash code creator.
      Returns:
        a fresh hash code creator

    - #### equalsIdentity

          public static boolean equalsIdentity(java.lang.Object o1,
                               java.lang.Object o2)

      Determines whether two objects are the same as instances.
      Parameters:
        `o1` -
        `o2` -
      Returns:
        whether the two objects are the same as instances

    - #### identical

          public static boolean identical(java.lang.Object o1,
                          java.lang.Object o2)

      Determines whether two objects are identical. If the objects implement `Deduplicable`, the deduplication method is used to compare the objects. Otherwise, `Object.equals` is used.
      Parameters:
        `o1` -
        `o2` -
      Returns:
        whether the two objects are identical

    - #### identical

          public static boolean identical(java.lang.Object[] v1,
                          java.lang.Object[] v2)

      Determines whether two arrays of objects are identical.
      Parameters:
        `v1` -
        `v2` -
      Returns:
        whether the two arrays are identical
      See Also:
        `identical(Object, Object)`

    - #### identical

          public static boolean identical(java.util.List<?> l1,
                          java.util.List<?> l2)

      Determines whether two lists of objects are identical.
      Parameters:
        `l1` -
        `l2` -
      Returns:
        whether the two lists of objects are identical
      See Also:
        `identical(Object, Object)`

    - #### equals

          public static boolean equals(java.lang.Object o1,
                       java.lang.Object o2)

      Determines whether two objects are equal, including `null` values.
      Parameters:
        `o1` -
        `o2` -
      Returns:
        whether the two objects are equal

    - #### equals

          public static <T extends java.lang.Enum<T>> boolean equals(java.lang.Enum<T> o1,
                                                     java.lang.Enum<T> o2)

      Determines whether two enum values are equal.
      Parameters:
        `o1` -
        `o2` -
      Returns:
        whether the two enum values are equal

    - #### equals

          public static boolean equals(boolean b1,
                       boolean b2)

      Determines whether two boolean values are equal.
      Parameters:
        `b1` -
        `b2` -
      Returns:
        whether the two values are equal

    - #### equals

          public static boolean equals(int i1,
                       int i2)

      Determines whether two integer values are equal.
      Parameters:
        `i1` -
        `i2` -
      Returns:
        whether the two values are equal

    - #### equals

          public static boolean equals(JRPropertiesMap p1,
                       JRPropertiesMap p2)

      Determines whether two property sets are identical.
      Parameters:
        `p1` -
        `p2` -
      Returns:
        whether the two property sets are identical

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com