logist.plan
Class Action

java.lang.Object
  extended by logist.plan.Action
Direct Known Subclasses:
Action.Delivery, Action.Move, Action.Pickup

public abstract class Action
extends java.lang.Object

An action of a vehicle during the simulation. There are 3 possibles actions:

Author:
Robin Steiger
See Also:
PlanVerifier, Plan

Nested Class Summary
static class Action.Delivery
          A delivery of a task
static class Action.Move
          A move to another city
static class Action.Pickup
          A pickup of a task
 
Method Summary
abstract
<T> T
accept(ActionHandler<T> handler)
          Performs a pattern matching on the type of task.
abstract  java.lang.String toLongString()
          Shows tasks with full details rather than just the id.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toLongString

public abstract java.lang.String toLongString()
Shows tasks with full details rather than just the id.


accept

public abstract <T> T accept(ActionHandler<T> handler)
Performs a pattern matching on the type of task.

Type Parameters:
T - the type of the value produced by the handler
Parameters:
handler - the handler for each pattern
Returns:
the result of the handler