|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjavalib.worldimages.AImage
javalib.worldimages.ColoredImage
abstract class ColoredImage
Any image that explicitly stores a color and a mode.
| Field Summary | |
|---|---|
static Color |
defaultColor
|
| Fields inherited from interface javalib.worldimages.WorldImage |
|---|
LOOKS_SAME |
| Constructor Summary | |
|---|---|
ColoredImage(Color color,
Mode mode)
The full constructor |
|
ColoredImage(IColor color,
Mode mode)
Another constructor that takes in an . |
|
ColoredImage(Mode mode)
Another constructor that takes no color. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object other)
Is this the same as another WorldImage, as expression trees? Define this at every level that has instance variables. |
Color |
getColor()
get the color of an image |
Mode |
getMode()
|
int |
hashCode()
Get a hash code for the WorldImage. |
(package private) abstract ColoredImage |
replaceColor(Color newColor)
Functional setter for the color field Define this in all concrete subclasses. |
(package private) ColoredImage |
replaceColor(IColor newColor)
|
(package private) abstract ColoredImage |
replaceMode(Mode newMode)
Functional setter for the mode field Define this in all concrete subclasses. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javalib.worldimages.WorldImage |
|---|
draw, getBottom, getRight, toIndentedString |
| Field Detail |
|---|
public static final Color defaultColor
| Constructor Detail |
|---|
ColoredImage(Color color,
Mode mode)
color -
ColoredImage(IColor color,
Mode mode)
IColorIColor.
color - ColoredImage(Mode mode)
| Method Detail |
|---|
public boolean equals(Object other)
WorldImage
equals in interface WorldImageequals in class AImageother - the object to compare with this
public Color getColor()
public Mode getMode()
public int hashCode()
WorldImage
hashCode in interface WorldImagehashCode in class Objectabstract ColoredImage replaceColor(Color newColor)
newColor -
ColoredImage replaceColor(IColor newColor)
abstract ColoredImage replaceMode(Mode newMode)
newMode -
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||