org.joda.primitives.collection.impl
Class AbstractPrimitiveCollectable<N>

java.lang.Object
  extended by org.joda.primitives.collection.impl.AbstractPrimitiveCollectable<N>
All Implemented Interfaces:
PrimitiveCollectable<N>
Direct Known Subclasses:
AbstractBooleanCollection, AbstractByteCollection, AbstractCharCollection, AbstractDoubleCollection, AbstractFloatCollection, AbstractIntCollection, AbstractLongCollection, AbstractShortCollection

public abstract class AbstractPrimitiveCollectable<N>
extends Object
implements PrimitiveCollectable<N>

Abstract base class for collections of primitive elements.

Since:
1.0
Author:
Stephen Colebourne

Constructor Summary
protected AbstractPrimitiveCollectable()
          Constructor.
 
Method Summary
 Object clone()
          Clone implementation that calls Object clone().
 boolean isEmpty()
          Checks if the collection is empty.
 boolean isModifiable()
          Checks whether the object can currently be modified.
 void optimize()
          Optimizes the implementation after initialization.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.joda.primitives.PrimitiveCollectable
clear, size
 

Constructor Detail

AbstractPrimitiveCollectable

protected AbstractPrimitiveCollectable()
Constructor.

Method Detail

optimize

public void optimize()
Optimizes the implementation after initialization.

This implementation does nothing.

Specified by:
optimize in interface PrimitiveCollectable<N>

isModifiable

public boolean isModifiable()
Checks whether the object can currently be modified.

This implementation returns false.

Specified by:
isModifiable in interface PrimitiveCollectable<N>
Returns:
false

isEmpty

public boolean isEmpty()
Checks if the collection is empty.

Specified by:
isEmpty in interface PrimitiveCollectable<N>
Returns:
true if empty

clone

public Object clone()
Clone implementation that calls Object clone().

Specified by:
clone in interface PrimitiveCollectable<N>
Overrides:
clone in class Object
Returns:
the clone


Copyright © 2005-2010 Joda.org. All Rights Reserved.