opennlp.maxent
Class IntegerPool
java.lang.Object
opennlp.maxent.IntegerPool
public class IntegerPool
- extends Object
A pool of read-only, unsigned Integer objects within a fixed,
non-sparse range. Use this class for operations in which a large
number of Integer wrapper objects will be created.
Constructor Summary |
IntegerPool(int size)
Creates an IntegerPool with 0..size Integer objects. |
Method Summary |
Integer |
get(int value)
Returns the shared Integer wrapper for value if it is inside the
range managed by this pool. |
IntegerPool
public IntegerPool(int size)
- Creates an IntegerPool with 0..size Integer objects.
- Parameters:
size
- the size of the pool.
get
public Integer get(int value)
- Returns the shared Integer wrapper for value if it is inside the
range managed by this pool. if value is outside the range, a new
Integer instance is returned.
- Parameters:
value
- an int
value
- Returns:
- an
Integer
value
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.