org.epics.util.array.CollectionNumber Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of epics-util Show documentation
Show all versions of epics-util Show documentation
Basic Java utility classes to be shared across projects until
suitable replacements are available in the JDK.
/**
* Copyright (C) 2012 Brookhaven National Laboratory
* All rights reserved. Use is subject to license terms.
*/
package org.epics.util.array;
import java.util.Collection;
/**
* A collection of numeric (primitive) elements. It provides a size and
* can be iterated more than once.
*
* The method names are taken from {@link Collection}, though not all
* methods are specified. At this moment, the class is read-only. If in the
* future the class is extended, the new methods should match the names from
* {@link Collection}.
*
* @author Gabriele Carcassi
*/
public interface CollectionNumber {
/**
* Returns an iterator over the elements of the collection.
*
* @return a new iterator
*/
IteratorNumber iterator();
/**
* Returns the number of elements in the collection.
*
* @return the number of elements in the collection
*/
int size();
}