Class CorrelationId

  • All Implemented Interfaces:
    java.lang.Cloneable, java.lang.Comparable<CorrelationId>

    public class CorrelationId
    extends java.lang.Object
    implements java.lang.Cloneable, java.lang.Comparable<CorrelationId>
    Describes the necessary parameters for an implementation in order to identify and set dynamic variables
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String CORREL_PREFIX
      Prefix to the name of correlating variables.
      private int id  
      private java.lang.String name  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
        CorrelationId​(int id)
      Creates a correlation identifier.
      private CorrelationId​(int id, java.lang.String name)
      Creates a correlation identifier.
        CorrelationId​(java.lang.String name)
      Creates a correlation identifier from a name.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(CorrelationId other)  
      boolean equals​(java.lang.Object obj)  
      int getId()
      Returns the identifier.
      java.lang.String getName()
      Returns the preferred name of the variable.
      int hashCode()  
      static java.util.Set<java.lang.String> names​(java.util.Set<CorrelationId> set)
      Converts a set of names to a set of correlation ids.
      static com.google.common.collect.ImmutableSet<CorrelationId> setOf​(java.util.Set<java.lang.String> set)
      Converts a set of correlation ids to a set of names.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • CORREL_PREFIX

        public static final java.lang.String CORREL_PREFIX
        Prefix to the name of correlating variables.
        See Also:
        Constant Field Values
      • id

        private final int id
      • name

        private final java.lang.String name
    • Constructor Detail

      • CorrelationId

        private CorrelationId​(int id,
                              java.lang.String name)
        Creates a correlation identifier.
      • CorrelationId

        public CorrelationId​(int id)
        Creates a correlation identifier. This is a type-safe wrapper over int.
        Parameters:
        id - Identifier
      • CorrelationId

        public CorrelationId​(java.lang.String name)
        Creates a correlation identifier from a name.
        Parameters:
        name - variable name
    • Method Detail

      • getId

        public int getId()
        Returns the identifier.
        Returns:
        identifier
      • getName

        public java.lang.String getName()
        Returns the preferred name of the variable.
        Returns:
        name
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • compareTo

        public int compareTo​(CorrelationId other)
        Specified by:
        compareTo in interface java.lang.Comparable<CorrelationId>
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • setOf

        public static com.google.common.collect.ImmutableSet<CorrelationId> setOf​(java.util.Set<java.lang.String> set)
        Converts a set of correlation ids to a set of names.
      • names

        public static java.util.Set<java.lang.String> names​(java.util.Set<CorrelationId> set)
        Converts a set of names to a set of correlation ids.