Enum BlueUrlTokenizer.UrlPart

  • All Implemented Interfaces:
    Serializable, Comparable<BlueUrlTokenizer.UrlPart>
    Enclosing class:

    public static enum BlueUrlTokenizer.UrlPart
    extends Enum<BlueUrlTokenizer.UrlPart>
    Enum of URL "parts".

    Use BlueUrlTokenizer.getPart(UrlPart) to get a specific URL "part", or call BlueUrlTokenizer.hasPart(UrlPart) to check for it's existence.

    *** TBD: decide whether to stick with this model, or to switch to more of a straight getters/setters style on the BlueUrlTokenizer instance. Reason for trying this approach ("parts" enum) is that I (TF) think the straight properties style with getters/setters would get messy as we add support for parsing more URL paths/parts i.e. a getters/setters API explosion. That said ... not sure I love this approach either, hence marked BlueoceanUrl as @Restricted(NoExternalUse.class). Let's suck it and see for a bit and change if it sucks :)

    • Method Detail

      • values

        public static BlueUrlTokenizer.UrlPart[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (BlueUrlTokenizer.UrlPart c : BlueUrlTokenizer.UrlPart.values())
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static BlueUrlTokenizer.UrlPart valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        name - the name of the enum constant to be returned.
        the enum constant with the specified name
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null