Class WhiteBlackList.WhiteBlackListPrefix

  • Enclosing class:
    WhiteBlackList

    public static class WhiteBlackList.WhiteBlackListPrefix
    extends WhiteBlackList
    Whitelist/blacklist for prefix strings.
    • Constructor Detail

      • WhiteBlackListPrefix

        public WhiteBlackListPrefix()
    • Method Detail

      • addToWhitelist

        public void addToWhitelist​(String str)
        Add to the whitelist.
        Specified by:
        addToWhitelist in class WhiteBlackList
        Parameters:
        str - The string to whitelist.
      • addToBlacklist

        public void addToBlacklist​(String str)
        Add to the blacklist.
        Specified by:
        addToBlacklist in class WhiteBlackList
        Parameters:
        str - The string to blacklist.
      • isWhitelistedAndNotBlacklisted

        public boolean isWhitelistedAndNotBlacklisted​(String str)
        Check if the requested string has a whitelisted/non-blacklisted prefix.
        Specified by:
        isWhitelistedAndNotBlacklisted in class WhiteBlackList
        Parameters:
        str - The string to test.
        Returns:
        true if the string is whitelisted and not blacklisted.
      • isWhitelisted

        public boolean isWhitelisted​(String str)
        Check if the requested string has a whitelisted prefix.
        Specified by:
        isWhitelisted in class WhiteBlackList
        Parameters:
        str - The string to test.
        Returns:
        true if the string is whitelisted.
      • whitelistHasPrefix

        public boolean whitelistHasPrefix​(String str)
        Prefix-of-prefix is invalid.
        Specified by:
        whitelistHasPrefix in class WhiteBlackList
        Parameters:
        str - The string to test.
        Returns:
        true if the string is a prefix of a whitelisted string.
      • isBlacklisted

        public boolean isBlacklisted​(String str)
        Check if the requested string has a blacklisted prefix.
        Specified by:
        isBlacklisted in class WhiteBlackList
        Parameters:
        str - The string to test.
        Returns:
        true if the string is blacklisted.