export declare class ArrayUtils {
    /**
     * Inserts given element into given array, on given index number.
     *
     * @param index The index position for the element to insert, use negatives to count from the arrays end
     * @param element The element to insert
     * @param array The array to insert the element into
     * @returns True if and only if given element is succesfully inserted into given array.
     */
    static InsertElement<T>(index: number, element: T, array: T[]): boolean;
    /**
     * Removes given element from given array. Doesn't just set it to null like JavaScripts standard 'delete' keyword, but truly removes the
     * element using splice(). Also works on associative arrays.
     *
     * @param element The element to remove.
     * @param array The array to remove the element from.
     * @returns True iff given element was truly successfully removed from given array.
     */
    static RemoveElement<T>(element: T, array: T[]): boolean;
    /**
     * Returns a true shallow clone of given array plus all its items. Its first-level members are object-shallow-cloned (optionally with a
     * strongly typed constructor),
     * or just as plain object (see param arrayItemsClass).
     * @param arrayGiven
     * @param arrayItemsClass If provided, the cloned array's first-level items will be strongly typed to / constructed as this class. Otherwise
     * it'll be a plain object.
     * @returns a true shallow clone of given array plus all its items
     */
    static ShallowCloneArrayAndItsItem<T>(arrayGiven: T[], arrayItemsClass?: any): T[];
    /**
     * Moves given element to given toIndex in given array. Returns whether the element was really moved, thus changing the given array.
     */
    static MoveElement<T>(element: T, toIndex: number, array: T[]): boolean;
    /**
     * Returns max value from all resulting values from applying given itemValueFunction to all items of given array.
     * @param array
     * @param itemValueFunction The function aplied to each array item that gives it a numerical value. The max num val found is returned.
     */
    static GetMaxCalculatedValue<T>(array: T[], itemValueFunction: (item: T) => number): number;
    static IsArrayWithElements<T>(arrayToCheck: T[], clazz?: any): boolean;
    static RemoveElementsByFilter(array: any[], filterFunction: (item: any) => boolean): boolean;
    static ReplaceElement<T>(elementIn: T, elementOut: T, array: T[]): void;
    static SwapElements<T>(elementOne: T, elementTwo: T, array: T[]): boolean;
    static ToggleElement<T>(toggle: T, elements: T[]): void;
    static CountWhere<T>(array: T[], whereFunction: (item: T) => boolean): number;
    /**
     * Returns whether at least one element in given array could be found by given finder function.
     *
     * @param array
     * @param finder A finder function that takes an element of the array and returns a boolean that represents
     * the 'found status' for that element; whether it should have been found or not.
     */
    static ContainsAnElementFoundBy<T>(array: T[], finder: (element: T) => boolean): boolean;
    /**
     * Cross-browser Array.find() function. Returns the first item in given array for which the foundBy function returns true. Returns
     * undefined when none was found.
     *
     * Example usage:
     * let foundItem: BusinessObject = ArrayUtils.Find<BusinessObject>(modelArray, (modelItem: BusinessObject) => <br>
     *     (return modelItem.getId() === '1')
     *   * });
     *
     * @param array The array with items to search in.
     * @param foundBy The finder function applied on each items of the array, when that returns true, the item is considered found.
     */
    static Find<T>(array: T[], foundBy: (item: T) => boolean): T;
    /**
     * Sorts all items in the given array alphabetically (A-to-Z) according to the values of their given property.
     * @param theArray
     * @param propertyName = undefined] When not defined, assumes an array of STRINGS is given, instead of array of OBJECTS.
     * @param [reverseOrder = false] Set to true to sort from Z-to-A instead
     */
    static SortAlphabetically<T>(theArray: T[], propertyName?: string, reverseOrder?: boolean): void;
    static PushIfNotExist(item: any, array: any[]): boolean;
    /**
     * Removes element at given index from given array. Doesn't just set it to null like JavaScripts standard 'delete' does, but really
     * removes the element using splice().
     *
     * @param index
     * @param array
     * @returns True if and only if the element on given index is succesfully removed from given array.
     */
    static RemoveElementAtIndex(index: number, array: any[]): boolean;
    static Includes(array: any[], item: any): boolean;
}
