Class Transition

  • All Implemented Interfaces:
    java.io.Serializable

    public class Transition
    extends java.lang.Object
    implements java.io.Serializable
    This is a small and ugly class for storing a transition. It is hash-code-able, and has a sensible equality operator.
    Author:
    Matthew Pocock
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      State from  
      State to  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)
      Two transitions are equal if they have the same from and to states.
      int hashCode()
      The hash code is from.hashCode() ^ to.hashCode()
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object o)
                       throws java.lang.ClassCastException
        Two transitions are equal if they have the same from and to states.
        Overrides:
        equals in class java.lang.Object
        Throws:
        java.lang.ClassCastException
      • hashCode

        public int hashCode()
        The hash code is from.hashCode() ^ to.hashCode()
        Overrides:
        hashCode in class java.lang.Object