Example usage for org.jfree.util ObjectUtils equal

List of usage examples for org.jfree.util ObjectUtils equal

Introduction

In this page you can find the example usage for org.jfree.util ObjectUtils equal.

Prototype

public static boolean equal(Object o1, Object o2) 

Source Link

Document

Returns true if the two objects are equal OR both null.

Usage

From source file:org.kalypso.ogc.gml.CascadingThemeHelper.java

/**
 * Search for a theme by its feature-path.
 * /*w  ww  . ja v a  2s .  c o  m*/
 * @return The child-theme which is a {@link IKalypsoFeatureTheme} and whose feature-path corresponds to the given
 *         one.
 */
public static IKalypsoFeatureTheme findThemeWithFeaturePath(final IKalypsoCascadingTheme cascadingTheme,
        final String featurePath) {
    final IKalypsoTheme[] allThemes = cascadingTheme.getAllThemes();
    for (final IKalypsoTheme kalypsoTheme : allThemes) {
        if (kalypsoTheme instanceof IKalypsoFeatureTheme) {
            final IKalypsoFeatureTheme featureTheme = (IKalypsoFeatureTheme) kalypsoTheme;
            if (ObjectUtils.equal(featureTheme.getFeaturePath(), featurePath))
                return featureTheme;
        }
    }

    return null;
}