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

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

public final class AtFollow
extends java.lang.Object
implements AtRefNumber

A value that only returnes the referrent value or start if the AtRefRangeNumber interface methods are used.
Use instance to get the only needed instance.

See Also:
Serialized Form

Method Summary
 boolean equals(java.lang.Object o)
           
static AtFollow getInstance()
          Returns the sole instance
 int getIntValue(float ref)
          Returns a value rounded to an int, possibly depending on the ref.
 int getIntValue(float start, float end)
          Returns offset rounded to an integer.
 float getValue(float ref)
          Returns a value, possibly depending on the ref.
 float getValue(float start, float end)
          Returns start
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getInstance

public static AtFollow getInstance()
Returns the sole instance

Returns:
The sole instance

getValue

public float getValue(float ref)
Description copied from interface: AtRefNumber
Returns a value, possibly depending on the ref.

Specified by:
getValue in interface AtRefNumber
Parameters:
ref - Some reference value. Might be used or disregarded depending on implementation.
Returns:
The value

getIntValue

public int getIntValue(float ref)
Description copied from interface: AtRefNumber
Returns a value rounded to an int, possibly depending on the ref.

Specified by:
getIntValue in interface AtRefNumber
Parameters:
ref - Some reference value. Might be used or disregarded depending on implementation.
Returns:
The value, rounded to an int.

getValue

public final float getValue(float start,
                            float end)
Returns start

Specified by:
getValue in interface AtRefRangeNumber
Parameters:
start - Returned
end - Not used.
Returns:
start.

getIntValue

public final int getIntValue(float start,
                             float end)
Returns offset rounded to an integer. The integer value is cached.

Specified by:
getIntValue in interface AtRefRangeNumber
Parameters:
start - Returned rounded.
end - Not used.
Returns:
start rounded to an int.

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.