Package org.jcsp.net

Class NodeUIImpl

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable

    public class NodeUIImpl
    extends NodeUI
    This is a default implementation for NodeUI that is used if no other implementation is supplied.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int hashCode  
      private long mem  
      private long time  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected NodeUIImpl()
      Constructor which is used as standard to create a new NodeUIImpl object.
        NodeUIImpl​(java.lang.String s)
      A constructor which takes a String that should be in the format of that returned by the getImplStringForm() method.
    • Field Detail

      • time

        private long time
      • mem

        private long mem
      • hashCode

        private int hashCode
    • Constructor Detail

      • NodeUIImpl

        protected NodeUIImpl()
        Constructor which is used as standard to create a new NodeUIImpl object.
      • NodeUIImpl

        public NodeUIImpl​(java.lang.String s)
        A constructor which takes a String that should be in the format of that returned by the getImplStringForm() method.
        Parameters:
        s - a String used to construct the NodeUIImpl object.
    • Method Detail

      • getImplStringForm

        public java.lang.String getImplStringForm()
        Returns a String object that can be used with the constructor that takes a String parameter.
        Specified by:
        getImplStringForm in class NodeUI
        Returns:
        a String that holds this object in "string form".
      • checkEqual

        public final boolean checkEqual​(NodeUI other)
        Compares another NodeUI with this NodeUIImpl.
        Specified by:
        checkEqual in class NodeUI
        Parameters:
        other - another NodeUI to compare with this object.
        Returns:
        true iff the NodeUI supplied is a NodeUIImpl object that contains the same internal unique identifier as this object.
      • getComparisonString

        protected java.lang.String getComparisonString()
        Returns a String that can be used by the superclass to compare two NodeUI objects.
        Specified by:
        getComparisonString in class NodeUI
        Returns:
        a String that follows the rules stated for this method in the NodeUI class.
      • hashCode

        public final int hashCode()
        Returns a hash code for this object.
        Specified by:
        hashCode in class NodeUI
        Returns:
        an int hash code for this object.