net.sf.mmm.util.pool.base
Class NoCharArrayPool

java.lang.Object
  extended by net.sf.mmm.util.pool.base.AbstractNoPool<char[]>
      extended by net.sf.mmm.util.pool.base.NoCharArrayPool
All Implemented Interfaces:
CharArrayPool, Pool<char[]>

public final class NoCharArrayPool
extends AbstractNoPool<char[]>
implements CharArrayPool

This is a dummy pool for char-arrays.

Since:
1.0.0
Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)

Field Summary
private static int ARRAY_LENGTH
          The default length of the managed char-arrays.
static NoCharArrayPool INSTANCE
          The singleton instance.
 
Constructor Summary
private NoCharArrayPool()
          The constructor.
 
Method Summary
 char[] borrow()
          This method borrows an element from this pool.
 
Methods inherited from class net.sf.mmm.util.pool.base.AbstractNoPool
isEmpty, release
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.mmm.util.pool.api.Pool
isEmpty, release
 

Field Detail

INSTANCE

public static final NoCharArrayPool INSTANCE
The singleton instance.


ARRAY_LENGTH

private static final int ARRAY_LENGTH
The default length of the managed char-arrays.

See Also:
Constant Field Values
Constructor Detail

NoCharArrayPool

private NoCharArrayPool()
The constructor.

Method Detail

borrow

public char[] borrow()
This method borrows an element from this pool. If you do NOT need the object anymore you should release it.
If this pool is empty, a new instance is created for you. Otherwise a existing instance (that has been released before) will be returned so it can be reused.

Specified by:
borrow in interface Pool<char[]>
Returns:
an element from the pool. Typically this method never returns null. This may only happen if explicitly documented by the chosen implementation.


Copyright © 2001-2010 mmm-Team. All Rights Reserved.