|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpl.edu.agh.cast.common.HexColor
public class HexColor
Class represents a color as three hex RGB values.
Constructor Summary | |
---|---|
HexColor()
Default constructor. |
|
HexColor(int red,
int green,
int blue)
Initializing constructor. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
int |
getBlue()
|
int |
getGreen()
|
int |
getRed()
|
int |
hashCode()
|
static HexColor |
parseColor(String hexColor)
Creates a HexColor instance based on it's string representation of form XXXXXX , where
X is a hex digit (0-F ). |
void |
setBlue(int blue)
|
void |
setGreen(int green)
|
void |
setRed(int red)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HexColor()
public HexColor(int red, int green, int blue)
red
- amount of redgreen
- amount of greenblue
- amount of blueMethod Detail |
---|
public static HexColor parseColor(String hexColor) throws Exception
HexColor
instance based on it's string representation of form XXXXXX
, where
X
is a hex digit (0-F
).
hexColor
- hexadecimal string representation of color
Exception
- on parsing errorpublic String toString()
toString
in class Object
Object.toString()
public int getRed()
public void setRed(int red)
public int getGreen()
public void setGreen(int green)
public int getBlue()
public void setBlue(int blue)
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |