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

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

public final class AtFixed
extends java.lang.Object
implements AtNumber

A value that is fixed to value no matter what the inputted for start and end.

See Also:
Serialized Form

Field Summary
static AtRefNumber FIXED0
          Static reference to a new AtFixed(0) object.
static AtRefNumber FIXED1
          Static reference to a new AtFixed(1) object.
 
Constructor Summary
AtFixed(float value)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 int getIntValue()
          Returns a size without a reference size, rounded to an int.
 int getIntValue(float refSize)
          Returns a value rounded to an int, possibly depending on the ref.
 int getIntValue(float start, float end)
          Returns the value as an int.
 float getValue()
          Returns a size without a reference size.
 float getValue(float refSize)
          Returns a value, possibly depending on the ref.
 float getValue(float start, float end)
          Returns the value.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FIXED0

public static final AtRefNumber FIXED0
Static reference to a new AtFixed(0) object. Can be used freely since it's immutable.


FIXED1

public static final AtRefNumber FIXED1
Static reference to a new AtFixed(1) object. Can be used freely since it's immutable.

Constructor Detail

AtFixed

public AtFixed(float value)
Constructor.

Parameters:
value - The value that will always be returned.
Method Detail

getValue

public final float getValue()
Description copied from interface: AtNumber
Returns a size without a reference size.

Specified by:
getValue in interface AtNumber
Returns:
The size.

getIntValue

public final int getIntValue()
Description copied from interface: AtNumber
Returns a size without a reference size, rounded to an int.

Specified by:
getIntValue in interface AtNumber
Returns:
The size, rounded to an int.

getValue

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

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

getIntValue

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

Specified by:
getIntValue in interface AtRefNumber
Parameters:
refSize - 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)
Description copied from interface: AtRefRangeNumber
Returns the value.

Specified by:
getValue in interface AtRefRangeNumber
Parameters:
start - The start value.
end - The end value.
Returns:
The returned value that depends on one or both of the arguments.

getIntValue

public final int getIntValue(float start,
                             float end)
Description copied from interface: AtRefRangeNumber
Returns the value as an int.

Specified by:
getIntValue in interface AtRefRangeNumber
Parameters:
start - The start value.
end - The end value.
Returns:
The returned value that depends on one or both of the arguments.

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.