Atavism Version 2018.1AGIS API

atavism.server.objects
Class Color

java.lang.Object
  extended by atavism.server.objects.Color
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, java.lang.Cloneable

public class Color
extends java.lang.Object
implements java.lang.Cloneable, java.io.Externalizable

See Also:
Serialized Form

Field Summary
static Color Black
           
static Color Red
           
static Color White
           
 
Constructor Summary
Color()
           
Color(int r, int g, int b)
           
Color(int r, int g, int b, int a)
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

White

public static Color White

Black

public static Color Black

Red

public static Color Red
Constructor Detail

Color

public Color()

Color

public Color(int r,
             int g,
             int b)

Color

public Color(int r,
             int g,
             int b,
             int a)
Method Detail

toString

public java.lang.String toString()
string representation in the format: (red,green,blue,alpha) example: "(35,103,64,0)"

Overrides:
toString in class java.lang.Object

equals

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

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

toBytes

public byte[] toBytes()

setRed

public void setRed(int val)

getRed

public int getRed()

setGreen

public void setGreen(int val)

getGreen

public int getGreen()

setBlue

public void setBlue(int val)

getBlue

public int getBlue()

setAlpha

public void setAlpha(int val)

getAlpha

public int getAlpha()

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
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. so whatever method deserializes should set it explicitly from the loading reference

Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException
See Also:
Externalizable

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
deserializes this object. usually to read in from a database or from another server sending us an object

Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException
See Also:
Externalizable


Copyright © 2018 Dragonsan Studios Sp. z o.o.