fulmine.protocol.wire
Class WireIdentity

java.lang.Object
  extended by fulmine.protocol.wire.WireIdentity
All Implemented Interfaces:
IWireIdentity

public class WireIdentity
extends Object
implements IWireIdentity

The default implementation of the IWireIdentity interface.

Author:
Ramon Servadei

Method Summary
 boolean equals(Object obj)
           
static WireIdentity get(int intWireId)
          Get the canonical IWF wire identity that represents the identity expressed by the integer argument.
static WireIdentity get(String stringWireId)
          Get the canonical SWF wire identity that represents the identity expressed by the string argument.
 int getAsInteger()
          Get the wire identity in its integer form.
 String getAsString()
          Get the wire identity in its string form.
 int hashCode()
           
 boolean isIntegerWireFormat()
          Describes the format of this wire identity.
 String toString()
          Return the string representation in the form:
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

get

public static WireIdentity get(String stringWireId)
Get the canonical SWF wire identity that represents the identity expressed by the string argument.

Parameters:
stringWireId - the identity of the SWF wire identity to return
Returns:
a canonical instance of the SWF wire identity that represents the identity expressed by the string argument

get

public static WireIdentity get(int intWireId)
Get the canonical IWF wire identity that represents the identity expressed by the integer argument.

Parameters:
intWireId - the identity of the IWF wire identity to return
Returns:
a canonical instance of the IWF wire identity that represents the identity expressed by the integer argument

isIntegerWireFormat

public boolean isIntegerWireFormat()
Description copied from interface: IWireIdentity
Describes the format of this wire identity.

Specified by:
isIntegerWireFormat in interface IWireIdentity
Returns:
true if the format is integer

getAsInteger

public int getAsInteger()
Description copied from interface: IWireIdentity
Get the wire identity in its integer form. If the wire identity is not an integer, this method will generate an exception.

Specified by:
getAsInteger in interface IWireIdentity
Returns:
the integer form of this wire identity
See Also:
IWireIdentity.isIntegerWireFormat()

getAsString

public String getAsString()
Description copied from interface: IWireIdentity
Get the wire identity in its string form. If the wire identity is an integer, this method will return the integer as a string.

Specified by:
getAsString in interface IWireIdentity
Returns:
the string form of this wire identity
See Also:
IWireIdentity.isIntegerWireFormat()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Return the string representation in the form:
 identity(type)
 

Overrides:
toString in class Object


Copyright © 2007-2009. All Rights Reserved.