Class WhiteBlackList.WhiteBlackListWholeString

    • Constructor Detail

      • WhiteBlackListWholeString

        public WhiteBlackListWholeString()
    • 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 is whitelisted and not blacklisted.
        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 is whitelisted.
        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)
        Check if the requested string is a prefix of a whitelisted string.
        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 is blacklisted.
        Specified by:
        isBlacklisted in class WhiteBlackList
        Parameters:
        str - The string to test.
        Returns:
        true if the string is blacklisted.