com.partnersoft.v3x.apps.Staker.domain
Class SpanCommands

java.lang.Object
  extended by com.partnersoft.v3x.apps.Staker.domain.SpanCommands

public class SpanCommands
extends java.lang.Object

A factory for SpanCommands. Encapsulates the interactive logic of manipulation of Spans.


Constructor Summary
SpanCommands()
           
 
Method Summary
static Command createAddUnitToSpanCommand(Span victim, UnitOnASpan unit)
          Returns a command object that, when invoked, adds the UnitOnASpan to the Span
static Command createCopyUnitsCommand(Span from, Span to)
          Returns a command object that, when invoked, copies the units from the supplied template Span on to the victim Span.
static Command createRemoveUnitFromSpanCommand(Span victim, UnitOnASpan unit)
          Returns a command object that, when invoked, removes the UnitOnASpan from the Span
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpanCommands

public SpanCommands()
Method Detail

createCopyUnitsCommand

public static Command createCopyUnitsCommand(Span from,
                                             Span to)
Returns a command object that, when invoked, copies the units from the supplied template Span on to the victim Span.


createAddUnitToSpanCommand

public static Command createAddUnitToSpanCommand(Span victim,
                                                 UnitOnASpan unit)
Returns a command object that, when invoked, adds the UnitOnASpan to the Span


createRemoveUnitFromSpanCommand

public static Command createRemoveUnitFromSpanCommand(Span victim,
                                                      UnitOnASpan unit)
Returns a command object that, when invoked, removes the UnitOnASpan from the Span