Ballerina API Documentation

Functions of ballerina.lang.arrays package

function copyOf(double[] doubleArray) (double[] )

Copies the specified double array

Parameters:

Parameter NameData TypeDescription
doubleArraydouble[]The array to be copied

Return Parameters:

Return VariableData TypeDescription
double[]double[]: A copy of the specified array

function copyOf(float[] floatArray) (float[] )

Copies the specified float array

Parameters:

Parameter NameData TypeDescription
floatArrayfloat[]The array to be copied

Return Parameters:

Return VariableData TypeDescription
float[]float[]: A copy of the specified array

function copyOf(int[] intArray) (int[] )

Copies the specified integer array

Parameters:

Parameter NameData TypeDescription
intArrayint[]The array to be copied

Return Parameters:

Return VariableData TypeDescription
int[]int[]: A copy of the specified array

function copyOf(json[] jsonArray) (json[] )

Copies the specified JSON array

Parameters:

Parameter NameData TypeDescription
jsonArrayjson[]The array to be copied

Return Parameters:

Return VariableData TypeDescription
json[]json[]: A copy of the specified array

function copyOf(long[] longArray) (long[] )

Copies the specified long array

Parameters:

Parameter NameData TypeDescription
longArraylong[]The array to be copied

Return Parameters:

Return VariableData TypeDescription
long[]long[]: A copy of the specified array

function copyOf(message[] messageArray) (message[] )

Copies the specified message object array

Parameters:

Parameter NameData TypeDescription
messageArraymessage[]The array to be copied

Return Parameters:

Return VariableData TypeDescription
message[]message[]: A copy of the specified array

function copyOf(string[] stringArray) (string[] )

Copies the specified string array

Parameters:

Parameter NameData TypeDescription
stringArraystring[]The array to be copied

Return Parameters:

Return VariableData TypeDescription
string[]string[]: A copy of the specified array

function copyOf(xml[] xmlArray) (xml[] )

Copies the specified XML array

Parameters:

Parameter NameData TypeDescription
xmlArrayxml[]The XML array to be copied

Return Parameters:

Return VariableData TypeDescription
xml[]xml[]: A copy of the specified array

function copyOfRange(double[] doubleArray, int from, int to) (double[] )

Copies the specified range of the specified double array

Parameters:

Parameter NameData TypeDescription
doubleArraydouble[]The double array from which the range will be copied
fromintThe initial index of the range
tointThe final index of the range

Return Parameters:

Return VariableData TypeDescription
double[]double[]: A new array with the specified range from the original array

function copyOfRange(float[] floatArray, int from, int to) (float[] )

Copies the specified range of the specified float array

Parameters:

Parameter NameData TypeDescription
floatArrayfloat[]The float array from which the range will be copied
fromintThe initial index of the range
tointThe final index of the range

Return Parameters:

Return VariableData TypeDescription
float[]float[]: A new array with the specified range from the original array

function copyOfRange(int[] intArray, int from, int to) (int[] )

Copies the specified range of the specified integer array

Parameters:

Parameter NameData TypeDescription
intArrayint[]The integer array from which the range will be copied
fromintThe initial index of the range
tointThe final index of the range

Return Parameters:

Return VariableData TypeDescription
int[]int[]: A new array with the specified range from the original array

function copyOfRange(json[] jsonArray, int from, int to) (json[] )

Copies the specified range of the specified JSON array

Parameters:

Parameter NameData TypeDescription
jsonArrayjson[]The JSON array from which the range will be copied
fromintThe initial index of the range
tointThe final index of the range

Return Parameters:

Return VariableData TypeDescription
json[]json[]: A new array with the specified range from the original array

function copyOfRange(long[] longArray, int from, int to) (long[] )

Copies the specified range of the specified long array

Parameters:

Parameter NameData TypeDescription
longArraylong[]The long array from which the range will be copied
fromintThe initial index of the range
tointThe final index of the range

Return Parameters:

Return VariableData TypeDescription
long[]long[]: A new array with the specified range from the original array

function copyOfRange(message[] messageArray, int from, int to) (message[] )

Copies the specified range of the specified message object array

Parameters:

Parameter NameData TypeDescription
messageArraymessage[]The message object array from which the range will be copied
fromintThe initial index of the range
tointThe final index of the range

Return Parameters:

Return VariableData TypeDescription
message[]message[]: A new array with the specified range from the original array

function copyOfRange(string[] stringArray, int from, int to) (string[] )

Copies the specified range of the specified string array

Parameters:

Parameter NameData TypeDescription
stringArraystring[]The string array from which the range will be copied
fromintThe initial index of the range
tointThe final index of the range

Return Parameters:

Return VariableData TypeDescription
string[]string[]: A new array with the specified range from the original array

function copyOfRange(xml[] xmlArray, int from, int to) (xml[] )

Copies the specified range of the specified XML array

Parameters:

Parameter NameData TypeDescription
xmlArrayxml[]The XML array from which the range will be copied
fromintThe initial index of the range
tointThe final index of the range

Return Parameters:

Return VariableData TypeDescription
xml[]xml[]: A new array with the specified range from the original array

function length(double[] doubleArray) (int )

Returns the length of the specified double array

Parameters:

Parameter NameData TypeDescription
doubleArraydouble[]The double array

Return Parameters:

Return VariableData TypeDescription
intThe length of the specified array

function length(float[] floatArray) (int )

Returns the length of the specified float array

Parameters:

Parameter NameData TypeDescription
floatArrayfloat[]The float array

Return Parameters:

Return VariableData TypeDescription
intThe length of the specified array

function length(int[] intArray) (int )

Returns the length of the specified integer array

Parameters:

Parameter NameData TypeDescription
intArrayint[]The integer array

Return Parameters:

Return VariableData TypeDescription
intThe length of the specified array

function length(json[] jsonArray) (int )

Returns the length of the specified JSON array

Parameters:

Parameter NameData TypeDescription
jsonArrayjson[]The JSON array

Return Parameters:

Return VariableData TypeDescription
intThe length of the specified array

function length(long[] longArray) (int )

Returns the length of the specified long array

Parameters:

Parameter NameData TypeDescription
longArraylong[]The long array

Return Parameters:

Return VariableData TypeDescription
intThe length of the specified array

function length(message[] messageArray) (int )

Returns the length of the specified message object array

Parameters:

Parameter NameData TypeDescription
messageArraymessage[]The message object array

Return Parameters:

Return VariableData TypeDescription
intThe length of the specified array

function length(string[] stringArray) (int )

Returns the length of the specified string array

Parameters:

Parameter NameData TypeDescription
stringArraystring[]The string array

Return Parameters:

Return VariableData TypeDescription
intThe length of the specified array

function length(xml[] xmlArray) (int )

Returns the length of the specified XML array

Parameters:

Parameter NameData TypeDescription
xmlArrayxml[]The XML array

Return Parameters:

Return VariableData TypeDescription
intThe length of the specified array

function sort(string[] arr) (string[] )

Sorts the specified string array

Parameters:

Parameter NameData TypeDescription
arrstring[]The string array to be sorted

Return Parameters:

Return VariableData TypeDescription
string[]string[]): The sorted array


Menu

  • Functions
    • copyOf(double[] doubleArray) (double[] )
    • copyOf(float[] floatArray) (float[] )
    • copyOf(int[] intArray) (int[] )
    • copyOf(json[] jsonArray) (json[] )
    • copyOf(long[] longArray) (long[] )
    • copyOf(message[] messageArray) (message[] )
    • copyOf(string[] stringArray) (string[] )
    • copyOf(xml[] xmlArray) (xml[] )
    • copyOfRange(double[] doubleArray, int from, int to) (double[] )
    • copyOfRange(float[] floatArray, int from, int to) (float[] )
    • copyOfRange(int[] intArray, int from, int to) (int[] )
    • copyOfRange(json[] jsonArray, int from, int to) (json[] )
    • copyOfRange(long[] longArray, int from, int to) (long[] )
    • copyOfRange(message[] messageArray, int from, int to) (message[] )
    • copyOfRange(string[] stringArray, int from, int to) (string[] )
    • copyOfRange(xml[] xmlArray, int from, int to) (xml[] )
    • length(double[] doubleArray) (int )
    • length(float[] floatArray) (int )
    • length(int[] intArray) (int )
    • length(json[] jsonArray) (int )
    • length(long[] longArray) (int )
    • length(message[] messageArray) (int )
    • length(string[] stringArray) (int )
    • length(xml[] xmlArray) (int )
    • sort(string[] arr) (string[] )

Copyright 2017 Ballerina API Documentation