Class StandardCategoryURLGenerator

    • Constructor Detail

      • StandardCategoryURLGenerator

        public StandardCategoryURLGenerator()
        Creates a new generator with default settings.
      • StandardCategoryURLGenerator

        public StandardCategoryURLGenerator​(String prefix)
        Constructor that overrides default prefix to the URL.
        Parameters:
        prefix - the prefix to the URL (null not permitted).
      • StandardCategoryURLGenerator

        public StandardCategoryURLGenerator​(String prefix,
                                            String seriesParameterName,
                                            String categoryParameterName)
        Constructor that overrides all the defaults.
        Parameters:
        prefix - the prefix to the URL (null not permitted).
        seriesParameterName - the name of the series parameter to go in each URL (null not permitted).
        categoryParameterName - the name of the category parameter to go in each URL (null not permitted).
    • Method Detail

      • generateURL

        public String generateURL​(CategoryDataset dataset,
                                  int series,
                                  int category)
        Generates a URL for a particular item within a series.
        Specified by:
        generateURL in interface CategoryURLGenerator
        Parameters:
        dataset - the dataset.
        series - the series index (zero-based).
        category - the category index (zero-based).
        Returns:
        The generated URL.
      • equals

        public boolean equals​(Object obj)
        Tests the generator for equality with an arbitrary object.
        Overrides:
        equals in class Object
        Parameters:
        obj - the object (null permitted).
        Returns:
        A boolean.
      • hashCode

        public int hashCode()
        Returns a hash code.
        Overrides:
        hashCode in class Object
        Returns:
        A hash code.