|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.opencyc.util.OcCollectionUtils
Provides Collection utilities not otherwise provided by Jakarta Commons. All methods are static. There is no need to instantiate this class.
Copyright 2001 Cycorp, Inc., license is open source GNU LGPL.
THIS SOFTWARE AND KNOWLEDGE BASE CONTENT ARE PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENCYC ORGANIZATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE AND KNOWLEDGE BASE CONTENT, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Constructor Summary | |
OcCollectionUtils()
|
Method Summary | |
static boolean |
hasDuplicates(java.util.Collection collection)
Returns true iff the given Collection has any
duplicated elements. |
static boolean |
hasIntersection(java.util.Collection a,
java.util.Collection b)
Returns true iff the given Collection s. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OcCollectionUtils()
Method Detail |
public static boolean hasIntersection(java.util.Collection a, java.util.Collection b)
Collection
s.
have any elements in common. Performs HashSet search for
larger collections.a
- the first collection considered for intersectionb
- the second collection considered for intersectionCollection
s.
have any elements in common.public static boolean hasDuplicates(java.util.Collection collection)
Collection
has any
duplicated elements.collection
- the collection under consideration for having duplicate elementsCollection
has any duplicated elements
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |