Class NodeKey<K extends java.lang.Comparable<K>>

  • Type Parameters:
    K - the type for the keys used to identify sources and destinations (String is a good default choice).
    All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, PublicCloneable

    public class NodeKey<K extends java.lang.Comparable<K>>
    extends java.lang.Object
    implements PublicCloneable, java.io.Serializable
    A key that identifies a node in a FlowDataset. Instances of this class are immutable.
    Since:
    1.5.3
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private K node  
      static java.lang.String SELECTED_PROPERTY_KEY
      The key for a node property that, if defined (at the dataset level), contains a Boolean value for the selection status of the node.
      private int stage
      The stage.
    • Constructor Summary

      Constructors 
      Constructor Description
      NodeKey​(int stage, K node)
      Creates a new key referencing a node in a FlowDataset.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object clone()
      Returns a clone of the object.
      boolean equals​(java.lang.Object obj)
      Tests this instance for equality with an arbitrary object.
      K getNode()
      Returns the identifier for the node.
      int getStage()
      Returns the stage number.
      int hashCode()
      Returns a hashcode for this instance.
      java.lang.String toString()
      Returns a string representation of this instance, primarily for debugging purposes.
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • SELECTED_PROPERTY_KEY

        public static final java.lang.String SELECTED_PROPERTY_KEY
        The key for a node property that, if defined (at the dataset level), contains a Boolean value for the selection status of the node.
        See Also:
        Constant Field Values
      • stage

        private final int stage
        The stage.
      • node

        private final K extends java.lang.Comparable<K> node
    • Constructor Detail

      • NodeKey

        public NodeKey​(int stage,
                       K node)
        Creates a new key referencing a node in a FlowDataset.
        Parameters:
        stage - the stage.
        node - the node key.
    • Method Detail

      • getStage

        public int getStage()
        Returns the stage number.
        Returns:
        The stage number.
      • getNode

        public K getNode()
        Returns the identifier for the node.
        Returns:
        The identifier for the node (never null).
      • toString

        public java.lang.String toString()
        Returns a string representation of this instance, primarily for debugging purposes.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string.
      • equals

        public boolean equals​(java.lang.Object obj)
        Tests this instance for equality with an arbitrary object.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - the object (null permitted).
        Returns:
        A boolean.
      • hashCode

        public int hashCode()
        Returns a hashcode for this instance.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        A hashcode.
      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Description copied from interface: PublicCloneable
        Returns a clone of the object.
        Specified by:
        clone in interface PublicCloneable
        Overrides:
        clone in class java.lang.Object
        Returns:
        A clone.
        Throws:
        java.lang.CloneNotSupportedException - if cloning is not supported for some reason.