Class FactGenerator

java.lang.Object
hudson.plugins.chucknorris.FactGenerator

public class FactGenerator extends Object
FactGenerator provides Chuck Norris facts.
Author:
cliffano
  • Constructor Details

    • FactGenerator

      public FactGenerator()
  • Method Details

    • randomIndex

      public int randomIndex()
      Retrieves a random fact index.
      Returns:
      a random index into the facts list
    • getFact

      public static String getFact(int index, Locale locale)
      Retrieves a fact by index for the given locale.
      Parameters:
      index - the fact index
      locale - the locale to use for lookup
      Returns:
      the localized fact string