ch.systemsx.cisd.openbis.dss.generic.shared.utils
Class SpeedUtils

java.lang.Object
  extended by ch.systemsx.cisd.openbis.dss.generic.shared.utils.SpeedUtils

public class SpeedUtils
extends java.lang.Object

Utility method for speed.


Constructor Summary
SpeedUtils()
           
 
Method Summary
static int trim(int speed)
          Returns trimmed speed.
static int trimSpeedHint(int speedHint)
          Returns trimmed speed hint.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpeedUtils

public SpeedUtils()
Method Detail

trim

public static int trim(int speed)
Returns trimmed speed. The trimmed speed is has value between 0 and Constants.MAX_SPEED.


trimSpeedHint

public static int trimSpeedHint(int speedHint)
Returns trimmed speed hint. If the absolute value of speed hint is larger than maximum speed the maximum value multiplied with the sign of the original value is returned.