public class IntegerPool extends Object
| Constructor and Description |
|---|
IntegerPool(int size)
Creates an IntegerPool with 0..size Integer objects.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public IntegerPool(int size)
size - the size of the pool.public Integer get(int value)
value - an int valueInteger valueCopyright © 2016 The Apache Software Foundation. All rights reserved.