fi.hut.tml.xsmiles.mlfc.smil.extension
Class AnimatedIntegerValue

java.lang.Object
  extended byfi.hut.tml.xsmiles.mlfc.smil.extension.AnimatedIntegerValue
All Implemented Interfaces:
AnimatedValue

public class AnimatedIntegerValue
extends java.lang.Object
implements AnimatedValue

Animated Integer Value, animates values in format "x"


Constructor Summary
AnimatedIntegerValue(float val)
           
AnimatedIntegerValue(float val, boolean percentageVal)
           
AnimatedIntegerValue(java.lang.String str)
           
 
Method Summary
 AnimatedValue add(AnimatedValue val)
          Add val to this.
 void clampValue()
           
 float distance(AnimatedValue val)
          Calculates the distance between this and val.
 float getValue()
           
 AnimatedValue interpolate(AnimatedValue val, float t)
          Interpolate between this and val by t, where t is [0,1].
 boolean isPercentage()
           
 AnimatedValue mult(int integer)
          Multiply this by integer value.
static AnimatedIntegerValue parse(java.lang.String str)
          Parse this string into value.
 java.lang.String toString()
          Parse this string into value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AnimatedIntegerValue

public AnimatedIntegerValue(float val)

AnimatedIntegerValue

public AnimatedIntegerValue(float val,
                            boolean percentageVal)

AnimatedIntegerValue

public AnimatedIntegerValue(java.lang.String str)
Method Detail

parse

public static AnimatedIntegerValue parse(java.lang.String str)
Parse this string into value. Throws NumberFormatException, if cannot parse.

Parameters:
str - String to be parsed
Returns:
Parsed AnimatedIntegerValue

isPercentage

public boolean isPercentage()

getValue

public float getValue()

toString

public java.lang.String toString()
Description copied from interface: AnimatedValue
Parse this string into value. Throws NumberFormatException, if cannot parse.

Specified by:
toString in interface AnimatedValue

clampValue

public void clampValue()
Specified by:
clampValue in interface AnimatedValue

add

public AnimatedValue add(AnimatedValue val)
Add val to this.

Specified by:
add in interface AnimatedValue
Parameters:
val - Val to be added to this.
Returns:
Returns val+this.

mult

public AnimatedValue mult(int integer)
Multiply this by integer value.

Specified by:
mult in interface AnimatedValue
Parameters:
integer - Integer value
Returns:
Returns this * integer.

interpolate

public AnimatedValue interpolate(AnimatedValue val,
                                 float t)
Interpolate between this and val by t, where t is [0,1]. For integers: (val-this)*t.

Specified by:
interpolate in interface AnimatedValue
Parameters:
val - AnimatedIntegerValue
Returns:
Returns this * integer.

distance

public float distance(AnimatedValue val)
Calculates the distance between this and val. (for one dimension: abs(this-val) )

Specified by:
distance in interface AnimatedValue
Parameters:
val - AnimatedIntegerValue
Returns:
Returns distance between this nad val..


X-Smiles 1.2