de.upb.swtpra05.group03.shuttle.shared
Class ShuttleStrategyData

java.lang.Object
  extended byde.upb.swtpra05.group03.shuttle.shared.ShuttleStrategyData
All Implemented Interfaces:
PickabackInterface

public class ShuttleStrategyData
extends java.lang.Object
implements PickabackInterface

Represents the percent profit margin the shuttle negotiation uses to calculate an offer

Version:
$Revision: 1.3 $

Field Summary
private  float margin
          the margin negotiation uses to calculate an offer
static int PICKABACKIDENTIFIER
          Identifier needed for generating the PickabackString and to recognize this class in a PickabackString
 
Fields inherited from interface de.upb.swtpra05.group03.shuttle.shared.PickabackInterface
MEMBERVARSEPARATOR, OBJECTSEPARATOR
 
Constructor Summary
ShuttleStrategyData()
          Constructor for the PluginGameConstants object
ShuttleStrategyData(float newMargin)
          Constructor for the ShuttleStrategyData object
 
Method Summary
static ShuttleStrategyData createShuttleDataFromPickaback(java.lang.String s)
          Decodes a previosly encoded ShuttleStrategyData-Pickabackstring and returns the ShuttleStrategyData
 float getMargin()
          Gets the margin attribute of the ShuttleStrategyData object
 void setMargin(float newMargin)
          Sets the maximumStretch attribute of the PluginGameConstants object
 java.lang.String toPickabackString()
          Description of the Method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

margin

private float margin
the margin negotiation uses to calculate an offer


PICKABACKIDENTIFIER

public static final int PICKABACKIDENTIFIER
Identifier needed for generating the PickabackString and to recognize this class in a PickabackString

See Also:
Constant Field Values
Constructor Detail

ShuttleStrategyData

public ShuttleStrategyData()
Constructor for the PluginGameConstants object


ShuttleStrategyData

public ShuttleStrategyData(float newMargin)
Constructor for the ShuttleStrategyData object

Parameters:
newMargin - Description of the Parameter
Method Detail

setMargin

public void setMargin(float newMargin)
Sets the maximumStretch attribute of the PluginGameConstants object

Parameters:
newMargin - The new margin value

getMargin

public float getMargin()
Gets the margin attribute of the ShuttleStrategyData object

Returns:
The margin value

toPickabackString

public java.lang.String toPickabackString()
Description of the Method

Returns:
Description of the Return Value

createShuttleDataFromPickaback

public static ShuttleStrategyData createShuttleDataFromPickaback(java.lang.String s)
Decodes a previosly encoded ShuttleStrategyData-Pickabackstring and returns the ShuttleStrategyData

Parameters:
s - a string-encoded ShuttleStrategyData
Returns:
the decoded ShuttleStrategyData