Class TwoCmres.Cmres

  • Enclosing class:
    TwoCmres

    static class TwoCmres.Cmres
    extends java.lang.Object
    Subcycle generator. Class is immutable.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      (package private) static class  TwoCmres.Cmres.Factory
      Factory.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.String HEX_FORMAT
      Hexadecimal format.
      private long multiply
      Multiplier.
      private int rotate
      Rotation.
      private static java.lang.String SEP
      Separator.
      private int start
      Cycle start.
    • Constructor Summary

      Constructors 
      Constructor Description
      Cmres​(long multiply, int rotate, int start)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getMultiply()  
      int getStart()  
      java.lang.String toString()
      (package private) long transform​(long state)  
      • Methods inherited from class java.lang.Object

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

      • HEX_FORMAT

        private static final java.lang.String HEX_FORMAT
        Hexadecimal format.
        See Also:
        Constant Field Values
      • start

        private final int start
        Cycle start.
      • multiply

        private final long multiply
        Multiplier.
      • rotate

        private final int rotate
        Rotation.
    • Constructor Detail

      • Cmres

        Cmres​(long multiply,
              int rotate,
              int start)
        Parameters:
        multiply - Multiplier.
        rotate - Positive number. Must be in [0, 64].
        start - Cycle start.
    • Method Detail

      • toString

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

        public long getMultiply()
        Returns:
        the multiplier.
      • getStart

        public int getStart()
        Returns:
        the cycle start.
      • transform

        long transform​(long state)
        Parameters:
        state - Current state.
        Returns:
        the new state.