Package org.jcsp.net
Class NodeUIImpl
java.lang.Object
org.jcsp.net.NodeUI
org.jcsp.net.NodeUIImpl
- All Implemented Interfaces:
Serializable
,Comparable
This is a default implementation for
NodeUI
that is used if no
other implementation is supplied.- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
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
Modifier and TypeMethodDescriptionfinal boolean
checkEqual
(NodeUI other) Compares anotherNodeUI
with thisNodeUIImpl
.protected String
Returns aString
that can be used by the superclass to compare twoNodeUI
objects.Returns aString
object that can be used with the constructor that takes aString
parameter.final int
hashCode()
Returns a hash code for this object.Methods inherited from class org.jcsp.net.NodeUI
compareTo, createFromStringForm, equals, getStringForm
-
Field Details
-
time
private long time -
mem
private long mem -
hashCode
private int hashCode
-
-
Constructor Details
-
NodeUIImpl
protected NodeUIImpl()Constructor which is used as standard to create a newNodeUIImpl
object. -
NodeUIImpl
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 Details
-
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
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
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.
-
hashCode
public final int hashCode()Returns a hash code for this object.
-