001/*
002 * Licensed under the Apache License, Version 2.0 (the "License");
003 * you may not use this file except in compliance with the License.
004 * You may obtain a copy of the License at
005 *
006 *     http://www.apache.org/licenses/LICENSE-2.0
007 *
008 * Unless required by applicable law or agreed to in writing, software
009 * distributed under the License is distributed on an "AS IS" BASIS,
010 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
011 * See the License for the specific language governing permissions and
012 * limitations under the License.
013 */
014package org.gbif.api.model.predicate;
015
016import org.gbif.api.model.common.search.SearchParameter;
017
018import com.fasterxml.jackson.annotation.JsonCreator;
019import com.fasterxml.jackson.annotation.JsonProperty;
020
021import io.swagger.v3.oas.annotations.media.Schema;
022
023/**
024 * This predicate checks if its {@code key} is less than its {@code value}.
025 */
026@Schema(
027  description = "This predicate checks if its `key` is less than to its `value`."
028)
029public class LessThanPredicate<S extends SearchParameter> extends SimplePredicate<S> {
030
031  @JsonCreator
032  public LessThanPredicate(@JsonProperty("key") S key, @JsonProperty("value") String value) {
033    super(true, key, value, null);
034  }
035}