public abstract class BNewArray extends Object implements BRefType, BCollection
BArray represents an arrays in Ballerina.| Modifier and Type | Field and Description |
|---|---|
protected static int |
DEFAULT_ARRAY_SIZE |
protected static int |
MAX_ARRAY_SIZE
The maximum size of arrays to allocate.
|
protected int |
size |
| Constructor and Description |
|---|
BNewArray() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
ensureCapacity(int requestedCapacity,
int currentArraySize) |
abstract BValue |
getBValue(long index) |
BType |
getType() |
abstract void |
grow(int newLength) |
protected Object |
newArrayInstance(Class<?> componentType) |
BIterator |
newIterator()
Create new Iterator for this collection.
|
protected void |
prepareForAdd(long index,
int currentArraySize) |
protected void |
rangeCheck(long index,
int size) |
protected void |
rangeCheckForGet(long index,
int size) |
protected void |
resetSize(int index) |
long |
size() |
String |
stringValue() |
BRefType |
value() |
protected static final int MAX_ARRAY_SIZE
This is same as Java
protected static final int DEFAULT_ARRAY_SIZE
protected int size
public abstract void grow(int newLength)
public String stringValue()
stringValue in interface BValueprotected void prepareForAdd(long index,
int currentArraySize)
protected void resetSize(int index)
protected void rangeCheck(long index,
int size)
protected void rangeCheckForGet(long index,
int size)
protected void ensureCapacity(int requestedCapacity,
int currentArraySize)
public long size()
public abstract BValue getBValue(long index)
public BIterator newIterator()
BCollectionnewIterator in interface BCollectionCopyright © 2018 WSO2. All rights reserved.