2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.deutschebahn.internal.filter;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.binding.deutschebahn.internal.timetable.dto.TimetableStop;
19 * And conjunction for {@link TimetableStopPredicate}.
21 * @author Sönke Küper - initial contribution
24 public final class AndPredicate implements TimetableStopPredicate {
26 private final TimetableStopPredicate first;
27 private final TimetableStopPredicate second;
30 * Creates a new {@link AndPredicate}.
32 public AndPredicate(TimetableStopPredicate first, TimetableStopPredicate second) {
38 public boolean test(TimetableStop t) {
39 return first.test(t) && second.test(t);
43 * Returns first argument.
45 TimetableStopPredicate getFirst() {
50 * Returns second argument.
52 TimetableStopPredicate getSecond() {