Package crackers.kobots.parts.movement
Class LinearMovement
-
- All Implemented Interfaces:
-
crackers.kobots.parts.movement.Movement
public class LinearMovement implements Movement
Describes where to go as a percentage of "in/out", where "in" is 0 and 100 is "out". A stopCheck function may also be supplied to terminate movement prior to reaching the desired setting.
-
-
Field Summary
Fields Modifier and Type Field Description private final Integer
percentage
private final Function0<Boolean>
stopCheck
-
Constructor Summary
Constructors Constructor Description LinearMovement(Integer percentage, Function0<Boolean> stopCheck)
-
Method Summary
Modifier and Type Method Description final Integer
getPercentage()
Function0<Boolean>
getStopCheck()
Returns true
if the movement should be stopped.-
-
Method Detail
-
getPercentage
final Integer getPercentage()
-
getStopCheck
Function0<Boolean> getStopCheck()
Returns
true
if the movement should be stopped.
-
-
-
-