org.nakedobjects.applib.value
Class Color

java.lang.Object
  extended by org.nakedobjects.applib.value.Magnitude
      extended by org.nakedobjects.applib.value.Color
All Implemented Interfaces:
java.io.Serializable

public class Color
extends Magnitude

Color is simple numerical representation of a color using the brightness of red, green and blue (RGB) components.

Where there is no basic colors (RGB all equal 0) then you get black; where each color is at maximum (RGB all equal 255) you get white.

TODO: currently this value type still uses @Facets rather than @Value.

See Also:
Serialized Form

Field Summary
static Color BLACK
           
static Color WHITE
           
 
Constructor Summary
Color(int color)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int intValue()
           
 boolean isEqualTo(Magnitude number)
          returns true if the number of this object has the same value as the specified number
 boolean isLessThan(Magnitude value)
          Returns true if this value is less than the specified value.
 java.lang.String title()
           
 java.lang.String toString()
           
 
Methods inherited from class org.nakedobjects.applib.value.Magnitude
isBetween, isGreaterThan, isGreaterThanOrEqualTo, isLessThanOrEqualTo, max, min
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

WHITE

public static final Color WHITE

BLACK

public static final Color BLACK
Constructor Detail

Color

public Color(int color)
Method Detail

intValue

public int intValue()

equals

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

isEqualTo

public boolean isEqualTo(Magnitude number)
returns true if the number of this object has the same value as the specified number

Specified by:
isEqualTo in class Magnitude

isLessThan

public boolean isLessThan(Magnitude value)
Returns true if this value is less than the specified value.

Specified by:
isLessThan in class Magnitude

title

public java.lang.String title()

toString

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


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.