code: private static String getStyleNameFromAnimation(final String animation, int count, int duration, int delay) {
  
          // fix input
          if (count < 0) count = -1;
          if (duration < 0) duration = -1;
          if (delay < 0) delay = -1;
  
          String styleName = "";
  
          // for all valid animations
          if (animation != null && !animation.isEmpty() && animation.split(" ").length > 1) {
  
              styleName += animation.split(" ")[1]+"-"+count+"-"+duration+"-"+delay;
  
          // for all custom animations
          } else if (animation != null && !animation.isEmpty() && animation.split(" ").length == 1) {
  
              styleName += animation+"-"+count+"-"+duration+"-"+delay;
  
          }
  
          return styleName;
  
      }
docs: Helper method, which returns unique class name for combination of animation and it's settings.
  
  @param animation Animation CSS class name.
  @param count Number of animation repeats.
  @param duration Animation duration in ms.
  @param delay Delay before starting the animation loop in ms.
  @return String representation of class name like "animation-count-duration-delay".