java.lang.Object
provided.listFW.visitors.AddToAlgo
- All Implemented Interfaces:
IListAlgo
Returns a copy of the list where the single integer parameter is added to all elements
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns an empty list alwaysnonEmptyCase(NEList host, Object... inp)
Returns a new NEList with the original first added to the given integer parameter, where the rest of the list is the AddToAlgo applied to the rest of the original list.
-
Constructor Details
-
AddToAlgo
public AddToAlgo()
-
-
Method Details
-
emptyCase
Returns an empty list always -
nonEmptyCase
Returns a new NEList with the original first added to the given integer parameter, where the rest of the list is the AddToAlgo applied to the rest of the original list.- Specified by:
nonEmptyCase
in interfaceIListAlgo
- Parameters:
inp
- inp[0] is the integer value to add to each element.host
- theNEList
that is executing this algorithm- Returns:
- result from calling this method. The type of the result is problem-specific and may be null.
-