Package org.jcsp.net
Class NodeUIImpl
- java.lang.Object
-
- org.jcsp.net.NodeUI
-
- org.jcsp.net.NodeUIImpl
-
- All Implemented Interfaces:
Serializable
,Comparable
public class NodeUIImpl extends NodeUI
This is a default implementation forNodeUI
that is used if no other implementation is supplied.- Author:
- Quickstone Technologies Limited
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
NodeUIImpl()
Constructor which is used as standard to create a newNodeUIImpl
object.NodeUIImpl(String s)
A constructor which takes aString
that should be in the format of that returned by thegetImplStringForm()
method.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkEqual(NodeUI other)
Compares anotherNodeUI
with thisNodeUIImpl
.protected String
getComparisonString()
Returns aString
that can be used by the superclass to compare twoNodeUI
objects.String
getImplStringForm()
Returns aString
object that can be used with the constructor that takes aString
parameter.int
hashCode()
Returns a hash code for this object.-
Methods inherited from class org.jcsp.net.NodeUI
compareTo, createFromStringForm, equals
-
-
-
-
Constructor Detail
-
NodeUIImpl
protected NodeUIImpl()
Constructor which is used as standard to create a newNodeUIImpl
object.
-
NodeUIImpl
public NodeUIImpl(String s)
A constructor which takes aString
that should be in the format of that returned by thegetImplStringForm()
method.- Parameters:
s
- aString
used to construct theNodeUIImpl
object.
-
-
Method Detail
-
getImplStringForm
public String getImplStringForm()
Returns aString
object that can be used with the constructor that takes aString
parameter.- Specified by:
getImplStringForm
in classNodeUI
- Returns:
- a
String
that holds this object in "string form".
-
checkEqual
public final boolean checkEqual(NodeUI other)
Compares anotherNodeUI
with thisNodeUIImpl
.- Specified by:
checkEqual
in classNodeUI
- Parameters:
other
- anotherNodeUI
to compare with this object.- Returns:
true
iff theNodeUI
supplied is aNodeUIImpl
object that contains the same internal unique identifier as this object.
-
getComparisonString
protected String getComparisonString()
Returns aString
that can be used by the superclass to compare twoNodeUI
objects.- Specified by:
getComparisonString
in classNodeUI
- Returns:
- a
String
that follows the rules stated for this method in theNodeUI
class.
-
-