All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cern.colt.list.AbstractCollection Maven / Gradle / Ivy

Go to download

Parallel Colt is a multithreaded version of Colt - a library for high performance scientific computing in Java. It contains efficient algorithms for data analysis, linear algebra, multi-dimensional arrays, Fourier transforms, statistics and histogramming.

The newest version!
/*
Copyright (C) 1999 CERN - European Organization for Nuclear Research.
Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose 
is hereby granted without fee, provided that the above copyright notice appear in all copies and 
that both that copyright notice and this permission notice appear in supporting documentation. 
CERN makes no representations about the suitability of this software for any purpose. 
It is provided "as is" without expressed or implied warranty.
 */
package cern.colt.list;

/**
 * Abstract base class for resizable collections holding objects or primitive
 * data types such as int, float, etc. First see the
 * package summary and javadoc tree view to get the broad picture.
 * 

* Note that this implementation is not synchronized. * * @author [email protected] * @version 1.0, 09/24/99 * @see java.util.ArrayList * @see java.util.Vector * @see java.util.Arrays */ // public abstract class AbstractCollection extends Object implements Cloneable, // java.io.Serializable { public abstract class AbstractCollection extends cern.colt.PersistentObject { /** * */ private static final long serialVersionUID = 1L; /** * Makes this class non instantiable, but still let's others inherit from * it. */ protected AbstractCollection() { } /** * Removes all elements from the receiver. The receiver will be empty after * this call returns. */ public abstract void clear(); /** * Tests if the receiver has no elements. * * @return true if the receiver has no elements; * false otherwise. */ public boolean isEmpty() { return size() == 0; } /** * Returns the number of elements contained in the receiver. * * @return the number of elements contained in the receiver. */ public abstract int size(); /** * Returns a java.util.ArrayList containing all the elements in * the receiver. */ public abstract java.util.ArrayList toList(); /** * Returns a string representation of the receiver, containing the String * representation of each element. */ public String toString() { return toList().toString(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy