Interface IFunctionCollection

    • Method Summary

      Modifier and Type Method Description
      void add​(IFunction func)
      Adds a new function to the collection.
      void clear()
      Clears the collection.
      IFunction findByName​(String name)
      Finds function in the list by it's name.
      int findIndexByName​(String name)
      Finds function index in the list by it's name.
      IFunction get​(int index)
      Get a function by its index.
      List<IFunction> getAll()
      Get all functions stores in the collection
      int length()
      Gets a number of functions stored in the collection.
      void remove​(int index)
      Removes a function by its index.
      void removeByName​(String name)
      Removes function by it's name.
    • Method Detail

      • add

        void add​(IFunction func)
        Adds a new function to the collection.
        Parameters:
        func - a function to be added.
      • length

        int length()
        Gets a number of functions stored in the collection.
        Returns:
        a number of stored functions.
      • get

        IFunction get​(int index)
        Get a function by its index.
        Parameters:
        index - a function index.
        Returns:
        a retrieved function.
      • getAll

        List<IFunction> getAll()
        Get all functions stores in the collection
        Returns:
        a list with functions.
      • findIndexByName

        int findIndexByName​(String name)
        Finds function index in the list by it's name.
        Parameters:
        name - The function name to be found.
        Returns:
        Function index in the list or -1 if function was not found.
      • findByName

        IFunction findByName​(String name)
        Finds function in the list by it's name.
        Parameters:
        name - The function name to be found.
        Returns:
        A function or null if function was not found.
      • remove

        void remove​(int index)
        Removes a function by its index.
        Parameters:
        index - a index of the function to be removed.
      • removeByName

        void removeByName​(String name)
        Removes function by it's name.
        Parameters:
        name - The function name to be removed.
      • clear

        void clear()
        Clears the collection.