diff options
Diffstat (limited to 'common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/predicate/int_/IsLessThanOrEqual.java')
-rw-r--r-- | common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/predicate/int_/IsLessThanOrEqual.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/predicate/int_/IsLessThanOrEqual.java b/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/predicate/int_/IsLessThanOrEqual.java new file mode 100644 index 0000000000..5c138d5147 --- /dev/null +++ b/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/predicate/int_/IsLessThanOrEqual.java @@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright (c) 2013, 2015 Oracle. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0, which accompanies this distribution + * and is available at http://www.eclipse.org/legal/epl-v10.html. + * + * Contributors: + * Oracle - initial API and implementation + ******************************************************************************/ +package org.eclipse.jpt.common.utility.internal.predicate.int_; + +/** + * This predicate evaluates to <code>true</code> if the variable is + * less than or equal to the criterion specified during construction. + */ +public class IsLessThanOrEqual + extends IntCriterionIntPredicate +{ + /** + * Construct a predicate that will evaluate to <code>true</code> if the + * variable is less than or equal to the specified criterion. + */ + public IsLessThanOrEqual(int criterion) { + super(criterion); + } + + public boolean evaluate(int variable) { + return variable <= this.criterion; + } +} |