Java Reference
In-Depth Information
METHODS
public Color brighter()
Returns a brighter version of the calling object color.
public Color darker()
Returns a darker version of the calling object color.
public boolean equals(Object c)
Returns true if c is equal to the calling object color; otherwise returns false.
public int getBlue()
Returns the blue component of the calling object. The returned value is in the range 0 to 255
(inclusive).
public int getGreen()
Returns the green component of the calling object. The returned value is in the range 0 to 255
(inclusive).
public int getRed()
Returns the red component of the calling object. The returned value is in the range 0 to 255
(inclusive).
CONSTANTS
Color.BLACK
Color.MAGENTA
Color.BLUE
Color.ORANGE
Color.CYAN
Color.PINK
Color.DARK_GRAY
Color.RED
Color.GRAY
Color.WHITE
Color.GREEN
Color.YELLOW
Color.LIGHT_GRAY
Comparable Interface
Package: java.lang
Ancestor interfaces: none
The Comparable interface has only one method heading that must be implemented.
public int compareTo(Object other)
The method compareTo should return
a negative number if the calling object “comes before” the parameter other ,
a zero if the calling object “equals” the parameter other ,
and a positive number if the calling object “comes after” the parameter other .
The “comes before” ordering that underlies compareTo should be a total ordering. Most normal
ordering, such as less-than on numbers and lexicographic ordering on strings, are total orderings.
 
Search WWH ::




Custom Search