001/*
002 * Copyright (C) 2012 The Guava Authors
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016
017package com.google.common.collect.testing;
018
019import com.google.common.annotations.GwtCompatible;
020import java.util.Map.Entry;
021import java.util.SortedMap;
022
023/**
024 * Creates sorted maps, containing sample elements, to be tested.
025 *
026 * @author Louis Wasserman
027 */
028@GwtCompatible
029public interface TestSortedMapGenerator<K, V> extends TestMapGenerator<K, V> {
030  @Override
031  SortedMap<K, V> create(Object... elements);
032
033  /**
034   * Returns an entry with a key less than the keys of the {@link #samples()} and less than the key
035   * of {@link #belowSamplesGreater()}.
036   */
037  Entry<K, V> belowSamplesLesser();
038
039  /**
040   * Returns an entry with a key less than the keys of the {@link #samples()} but greater than the
041   * key of {@link #belowSamplesLesser()}.
042   */
043  Entry<K, V> belowSamplesGreater();
044
045  /**
046   * Returns an entry with a key greater than the keys of the {@link #samples()} but less than the
047   * key of {@link #aboveSamplesGreater()}.
048   */
049  Entry<K, V> aboveSamplesLesser();
050
051  /**
052   * Returns an entry with a key greater than the keys of the {@link #samples()} and greater than
053   * the key of {@link #aboveSamplesLesser()}.
054   */
055  Entry<K, V> aboveSamplesGreater();
056}