sk.robotics.rlcs.data
Class Movement

java.lang.Object
  extended by sk.robotics.rlcs.data.Movement
All Implemented Interfaces:
com.microstepmis.xplatform.CustomXmlMappable, java.lang.Comparable<Movement>

public class Movement
extends java.lang.Object
implements java.lang.Comparable<Movement>, com.microstepmis.xplatform.CustomXmlMappable

Robot movement - direction, speed of left wheel, speed of right wheel. Objects of this class are immutable.


Nested Class Summary
static class Movement.Direction
           
 class Movement.XmlMappable
           
 
Field Summary
static Movement BK_FULLSPEED
           
static Movement FD_FULLSPEED
           
static Movement LT_FULLSPEED
           
static Movement NO_MOVE
           
static Movement RT_FULLSPEED
           
 
Constructor Summary
Movement(Movement.Direction dir, int lspeed, int rspeed)
           
 
Method Summary
 int compareTo(Movement m)
           
 boolean equals(java.lang.Object o)
           
 Movement.Direction getDirection()
           
 int getLeftSpeed()
           
 int getMaxSpeed()
           
 int getRightSpeed()
           
 Movement.XmlMappable getXmlMappable()
           
 int hashCode()
           
 boolean isBk()
           
 boolean isFd()
           
 boolean isFdOrBk()
           
 boolean isLt()
           
 boolean isLtOrRt()
           
 boolean isRt()
           
 java.lang.String toString()
           
static Movement valueOf(Movement.Direction dir, int lspeed, int rspeed)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_MOVE

public static final Movement NO_MOVE

FD_FULLSPEED

public static final Movement FD_FULLSPEED

BK_FULLSPEED

public static final Movement BK_FULLSPEED

LT_FULLSPEED

public static final Movement LT_FULLSPEED

RT_FULLSPEED

public static final Movement RT_FULLSPEED
Constructor Detail

Movement

public Movement(Movement.Direction dir,
                int lspeed,
                int rspeed)
Method Detail

valueOf

public static Movement valueOf(Movement.Direction dir,
                               int lspeed,
                               int rspeed)

getDirection

public Movement.Direction getDirection()

getLeftSpeed

public int getLeftSpeed()

getRightSpeed

public int getRightSpeed()

getMaxSpeed

public int getMaxSpeed()

isFd

public boolean isFd()

isBk

public boolean isBk()

isLt

public boolean isLt()

isRt

public boolean isRt()

isFdOrBk

public boolean isFdOrBk()

isLtOrRt

public boolean isLtOrRt()

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

compareTo

public int compareTo(Movement m)
Specified by:
compareTo in interface java.lang.Comparable<Movement>

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getXmlMappable

public Movement.XmlMappable getXmlMappable()
Specified by:
getXmlMappable in interface com.microstepmis.xplatform.CustomXmlMappable