001/*
002 *  Copyright 2001-2010 Stephen Colebourne
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 */
016package org.joda.primitives.collection;
017
018import java.util.Collection;
019
020import org.joda.primitives.PrimitiveCollectable;
021
022/**
023 * Base interface for all primitive collection interfaces.
024 * <p>
025 * This interface extends {@link java.util.Collection Collection} allowing seamless
026 * integration with other APIs.
027 * All Collection methods can be used, using the primitive wrapper class.
028 * However, it will be <em>much</em> more efficient to use the direct primitive methods
029 * in the subinterface.
030 * 
031 * @author Stephen Colebourne
032 * @since 1.0
033 */
034public interface PrimitiveCollection<E> extends PrimitiveCollectable<E>, Collection<E> {
035
036    // Mandatory operations
037    //-----------------------------------------------------------------------
038    /**
039     * Checks if this collection contains any of the values in the specified collection.
040     * If the specified collection is empty, <code>false</code> is returned.
041     *
042     * @param values  the values to search for, null treated as empty collection
043     * @return <code>true</code> if at least one of the values is found
044     */
045    boolean containsAny(Collection<?> values);
046
047}