⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 andpredicate.java

📁 BOOK:Beginning Algorithms Code Examples
💻 JAVA
字号:
package com.wrox.algorithms.iteration;/** * A {@link Predicate} that performs a boolean AND (&&) of two other predicates. * */public final class AndPredicate implements Predicate {    /** The left-hand argument. */    private final Predicate _left;    /** The right-hand argument. */    private final Predicate _right;    /**     * Constructor.     *     * @param left The left-hand argument.     * @param right The righ-hand argument.     */    public AndPredicate(Predicate left, Predicate right) {        assert left != null : "left can't be null";        assert right != null : "right can't be null";        _left = left;        _right = right;    }    public boolean evaluate(Object object) {        return _left.evaluate(object) && _right.evaluate(object);    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -