4 Replies Latest reply on Apr 8, 2008 11:45 AM by Ales Justin

    ControllerStates helper/util

    Ales Justin Master

      I'm thinking of introducing something like this

      public class ControllerStates
      {
       public static ControllerState previousState(List<ControllerState> states, ControllerState state);
      
       public static int currentStateIndex(List<ControllerState> states, ControllerState state);
      
       public static ControllerState nextState(List<ControllerState> states, ControllerState state);
      
       ...
      }
      

      to handle this previous/next state lookup in a singe place.
      Currently there is a bunch of code that does this, mostly w/o any constraints check, e.g. no such state in states.

      I'll push it in org.jboss.dependency.spi.helpers package.
      Or should/could this be on the ControllerState already?