public abstract class BNewArray extends Object implements BRefType, BCollection
BArray
represents an arrays in Ballerina.Modifier and Type | Field and Description |
---|---|
protected BType |
arrayType |
protected int |
maxArraySize
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 BType arrayType
protected int maxArraySize
This is same as Java
protected int size
public abstract void grow(int newLength)
public String stringValue()
stringValue
in interface BValue
protected 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()
BCollection
newIterator
in interface BCollection
Copyright © 2018 WSO2. All rights reserved.