Class Colours


  • public class Colours
    extends Object
    A web resource for a list of colours.
    • Constructor Detail

      • Colours

        public Colours()
    • Method Detail

      • getColourListAsText

        @GET
        @Produces("text/plain")
        public String getColourListAsText​(@QueryParam("match")
                                          String filter)
        Returns a list of colours as plain text, one colour per line.
        Parameters:
        filter - If not empty, constrains the list of colours to only those that contain this substring
        Returns:
        the list of colours matching the filter
      • getColourListAsJSON

        @GET
        @Produces("application/json")
        public org.codehaus.jettison.json.JSONArray getColourListAsJSON​(@QueryParam("match")
                                                                        String filter)
        Returns a list of colours as a JSON array.
        Parameters:
        filter - If not empty, constrains the list of colours to only those that contain this substring
        Returns:
        the list of colours matching the filter
      • getMatchingColours

        public static List<String> getMatchingColours​(String filter)
        Returns a list of colours.
        Parameters:
        filter - If not empty, constrains the list of colours to only those that contain this substring
        Returns:
        the list of colours matching the filter