1 /*
2 * Copyright 2001-2010 Stephen Colebourne
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package org.joda.primitives.collection;
17
18 import java.util.Collection;
19
20 import org.joda.primitives.PrimitiveCollectable;
21
22 /**
23 * Base interface for all primitive collection interfaces.
24 * <p>
25 * This interface extends {@link java.util.Collection Collection} allowing seamless
26 * integration with other APIs.
27 * All Collection methods can be used, using the primitive wrapper class.
28 * However, it will be <em>much</em> more efficient to use the direct primitive methods
29 * in the subinterface.
30 *
31 * @author Stephen Colebourne
32 * @since 1.0
33 */
34 public interface PrimitiveCollection<E> extends PrimitiveCollectable<E>, Collection<E> {
35
36 // Mandatory operations
37 //-----------------------------------------------------------------------
38 /**
39 * Checks if this collection contains any of the values in the specified collection.
40 * If the specified collection is empty, <code>false</code> is returned.
41 *
42 * @param values the values to search for, null treated as empty collection
43 * @return <code>true</code> if at least one of the values is found
44 */
45 boolean containsAny(Collection<?> values);
46
47 }