public class Color
extends java.lang.Object
implements java.lang.Cloneable, java.io.Externalizable
Modifier and Type | Field and Description |
---|---|
static Color |
Black |
static Color |
Red |
static Color |
White |
Constructor and Description |
---|
Color() |
Color(int r,
int g,
int b) |
Color(int r,
int g,
int b,
int a) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
boolean |
equals(java.lang.Object other) |
int |
getAlpha() |
int |
getBlue() |
int |
getGreen() |
int |
getRed() |
void |
readExternal(java.io.ObjectInput in)
deserializes this object.
|
void |
setAlpha(int val) |
void |
setBlue(int val) |
void |
setGreen(int val) |
void |
setRed(int val) |
byte[] |
toBytes() |
java.lang.String |
toString()
string representation in the format:
(red,green,blue,alpha)
example: "(35,103,64,0)"
|
void |
writeExternal(java.io.ObjectOutput out)
serializes this object for either storing into a database
or sending this object to another server, as in the case when
a mob zones into another server
note that the first time the user is being serialized, the dbid
wont be set.
|
public static Color White
public static Color Black
public static Color Red
public Color()
public Color(int r, int g, int b)
public Color(int r, int g, int b, int a)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object
public byte[] toBytes()
public void setRed(int val)
public int getRed()
public void setGreen(int val)
public int getGreen()
public void setBlue(int val)
public int getBlue()
public void setAlpha(int val)
public int getAlpha()
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
note that the first time the user is being serialized, the dbid wont be set. so whatever method deserializes should set it explicitly from the loading reference
writeExternal
in interface java.io.Externalizable
java.io.IOException
Externalizable
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
Externalizable