Interface IFunctionCollection
- All Known Implementing Classes:
DefaultFunctionCollection,FunctionCollection
public interface IFunctionCollection
Defines a functions list.
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a new function to the collection.voidclear()Clears the collection.findByName(String name) Finds function in the list by it's name.intfindIndexByName(String name) Finds function index in the list by it's name.get(int index) Get a function by its index.getAll()Get all functions stores in the collectionintlength()Gets a number of functions stored in the collection.voidremove(int index) Removes a function by its index.voidremoveByName(String name) Removes function by it's name.
-
Method Details
-
add
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
Get a function by its index.- Parameters:
index- a function index.- Returns:
- a retrieved function.
-
getAll
Get all functions stores in the collection- Returns:
- a list with functions.
-
findIndexByName
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
-1if function was not found.
-
findByName
Finds function in the list by it's name.- Parameters:
name- The function name to be found.- Returns:
- A function or
nullif 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
Removes function by it's name.- Parameters:
name- The function name to be removed.
-
clear
void clear()Clears the collection.
-