Package tools
Class ArrayTools
Object
ArrayTools
public class ArrayTools
extends Object
The
ArrayTools class contains miscellaneous methods relating to arrays.-
Method Summary
Modifier and Type Method Description static GeneralFunction[]append(GeneralFunction[] array, GeneralFunction element)Appends aGeneralFunctionto aGeneralFunction[]static GeneralFunction[]deepClone(GeneralFunction[] functionArray)Deep-clones aGeneralFunctionarraystatic GeneralFunction[]distribute(GeneralFunction[] multiply, GeneralFunction[] add)Returns aGeneralFunction[]where every element in add is now aProductofmultiplyand the function that was previously at its location inaddstatic booleanequalsSimplified(GeneralFunction[] first, GeneralFunction[] second)static GeneralFunction[]removeFunctionAt(GeneralFunction[] functionArray, int index)Returns a copy of the input array with theGeneralFunctionat the specified index removed
-
Method Details
-
deepClone
Deep-clones aGeneralFunctionarray- Parameters:
functionArray- array of Functions- Returns:
- a deep-clone of the
GeneralFunction[]
-
removeFunctionAt
Returns a copy of the input array with theGeneralFunctionat the specified index removed- Parameters:
functionArray- the array of GeneralFunctionsindex- index of the function to be removed- Returns:
- the new array
-
distribute
Returns aGeneralFunction[]where every element in add is now aProductofmultiplyand the function that was previously at its location inadd- Parameters:
multiply- theGeneralFunction[]which is distributed to every element inaddadd- theGeneralFunction[]which ismultiplybeing distributed on to- Returns:
GeneralFunction[]wheremultiplyhas been distributed toadd
-
append
Appends aGeneralFunctionto aGeneralFunction[]- Parameters:
array- the array to be appended toelement- the element to append- Returns:
- new combined
GeneralFunction[]
-
equalsSimplified
-