Package marauroa.common.game
Class RPLink
java.lang.Object
marauroa.common.game.RPLink
- All Implemented Interfaces:
Cloneable
,Serializable
An RPLink represent an object relation that is not as strong as RPSlot,
and although it could be modelled with a slot it would be better to manage
it with an RPLink.
I.e:
Buddies are handle now with a slot, when buddies are not an slot, so it
just makes code harder and more prone to error.
Buddies are not an slot in the sense that it is not something that a player
contains, but an abstraction of something that a player is aware of.
Bag is an slot
Buddies should be an RPLink
- Author:
- miguel
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
Returns true if two objects are exactly equalgetName()
Return the name of the rplinkReturns the object that represent this rplink.int
hashCode()
void
Method to build the object from a stream of bytesvoid
Sets the object for this RPLink.toString()
void
writeObject(OutputSerializer out)
Method to convert the object into a streamvoid
writeObject(OutputSerializer out, DetailLevel level)
Method to convert the object into a stream
-
Constructor Details
-
RPLink
Constructor- Parameters:
name
- name of linkobject
- target object
-
-
Method Details
-
getName
Return the name of the rplink- Returns:
- the name of the rplink
-
setObject
Sets the object for this RPLink.- Parameters:
object
- the object that will represent this RPLink.
-
getObject
Returns the object that represent this rplink.- Returns:
- the object that represent this rplink.
-
clone
-
toString
-
writeObject
Description copied from interface:Serializable
Method to convert the object into a stream- Specified by:
writeObject
in interfaceSerializable
- Parameters:
out
- OutputSerializer to write the object to- Throws:
IOException
- in case of an IO-error
-
writeObject
Method to convert the object into a stream- Parameters:
out
- OutputSerializer to write the object tolevel
- DetailLevel- Throws:
IOException
- in case of an IO-error
-
readObject
Description copied from interface:Serializable
Method to build the object from a stream of bytes- Specified by:
readObject
in interfaceSerializable
- Parameters:
in
- InputSerializer to read from- Throws:
IOException
- in case of an IO-error
-
equals
Returns true if two objects are exactly equal -
hashCode
public int hashCode()
-