com.miginfocom.util.gfx.geometry.numbers
Class AtStart

java.lang.Object
  extended by com.miginfocom.util.gfx.geometry.numbers.AtStart
All Implemented Interfaces:
AtRefRangeNumber, java.io.Serializable

public final class AtStart
extends java.lang.Object
implements AtRefRangeNumber

A value that is relative to the start. Basically returns start + off.

See Also:
Serialized Form

Field Summary
static AtRefRangeNumber START0
          Static reference to a new AtStart(0) object.
static AtRefRangeNumber START1
          Static reference to a new AtStart(1) object.
 
Constructor Summary
AtStart(float off)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 int getIntValue(float start, float end)
          Returns start + off rounded to the closest int.
 float getOffset()
          Returns the offset sent into the constructor.
 float getValue(float start, float end)
          Returns start + off.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

START0

public static final AtRefRangeNumber START0
Static reference to a new AtStart(0) object. Can be used freely since it's immutable.


START1

public static final AtRefRangeNumber START1
Static reference to a new AtStart(1) object. Can be used freely since it's immutable.

Constructor Detail

AtStart

public AtStart(float off)
Constructor.

Parameters:
off - The value that is added to start. I.e. the distance from the start.
Method Detail

getValue

public final float getValue(float start,
                            float end)
Returns start + off.

Specified by:
getValue in interface AtRefRangeNumber
Parameters:
start - The value added to off.
end - Not used.
Returns:
start + off

getIntValue

public final int getIntValue(float start,
                             float end)
Returns start + off rounded to the closest int.

Specified by:
getIntValue in interface AtRefRangeNumber
Parameters:
start - The value added to off.
end - Not used.
Returns:
start + off rounded to the closest int.

getOffset

public final float getOffset()
Returns the offset sent into the constructor.

Returns:
The offset sent into the constructor.

toString

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

equals

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


Copyright © 2009 MiG InfoCom AB. All Rights Reserved.