Class: FoodDelivery

FoodDelivery


new FoodDelivery()

Object used as the parameter for the Campaign method foodDelivery. Container class (behaves like a List).

Unless you own two ore more restaurants you don't need to deal with FoodDelivery other than in the example code.
Source:
FoodDelivery.js

Methods


iterator()

Java-like iterator to loop over all FoodUnit within this delivery.
Source:
FoodDelivery.js
Returns:
An iterator to loop
Type
Iterator

each(forEachElement)

JavaScript-like callback to loop over all FoodUnit within this delivery.
Parameters:
Name Type Description
forEachElement function Will be called for each available FoodUnit. Needs to have one parameter which will be a FoodUnit.
Source:
FoodDelivery.js

size()

Returns the container size
Source:
FoodDelivery.js
Returns:
the container size
Type
Number

get(index)

Returns a FoodUnit object at the index
Parameters:
Name Type Description
index Number index number to get
Source:
FoodDelivery.js
Returns:
the element at the position index
Type
FoodUnit