Class ContextUtil


  • public abstract class ContextUtil
    extends Object
    A utility class used to generate uniform contexts. Applications do not use this class.
    Since:
    03.05.03
    Version:
    4.4.0
    Author:
    Ktt Development
    • Constructor Detail

      • ContextUtil

        public ContextUtil()
    • Method Detail

      • getContext

        public static String getContext​(String context,
                                        boolean leadingSlash,
                                        boolean trailingSlash)
        Generates a uniform context with forward slashes removing any consecutive slashes.
        Parameters:
        context - context
        leadingSlash - if context should have a leading slash
        trailingSlash - if context should have a trailing slash
        Returns:
        context with uniform slashes
        Since:
        03.05.03
        See Also:
        joinContexts(boolean, boolean, String...)
      • joinContexts

        public static String joinContexts​(boolean leadingSlash,
                                          boolean trailingSlash,
                                          String... contexts)
        Generates a uniform context given a set of strings using forward slashes and removing consecutive slashes.
        Parameters:
        leadingSlash - if context should have a leading slash
        trailingSlash - if context should have a trailing slash
        contexts - contexts to join
        Returns:
        context with uniform slashes
        Since:
        03.05.03
        See Also:
        getContext(String, boolean, boolean)