All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.softicar.platform.common.container.iterator.EqualitySkipper Maven / Gradle / Ivy

Go to download

The SoftiCAR Platform is a lightweight, Java-based library to create interactive business web applications.

There is a newer version: 50.0.0
Show newest version
package com.softicar.platform.common.container.iterator;

/**
 * Simple implementation of the {@link ISkipper} interface.
 * 

* The {@link #shallSkip(Object)} function returns true if and only if the * example object is the same as the tested object or equal to it. * * @author Oliver Richers * @param * the type of the example and test objects */ public class EqualitySkipper implements ISkipper { private final T exampleObject; /** * Construct the skipper with the specified example object. * * @param exampleObject * an object to compare the test objects to; may be null */ public EqualitySkipper(T exampleObject) { this.exampleObject = exampleObject; } @Override public boolean shallSkip(T testObject) { return exampleObject == testObject || (exampleObject != null && exampleObject.equals(testObject)); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy