Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideNuGetDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide
NuGetDev CommunityOptimizely AcademySubmit a ticket

Optimizely developer documentation

How can we help you?

Try our conversational search powered by Generative AI!

AI OnAI Off

contains

Queries whether an entry is contained in the blocklist in Optimizely Campaign.

This method queries only exact matches.

If, for example, "*@example.com" is contained in the blocklist and you query john@example.com using this method, false is returned. If you query @example.com, true is returned. To a query both exact matches as well as wildcards, use the isBlacklisted method.

Type: boolean

Parameters

NameTypeValue
sessionIdStringID of the session
entryStringEntry to be queried

Return values

  • true: Entry is contained in the blocklist
  • false: Entry is not contained in the blocklist

Code structure

boolean contains(String sessionId, String entry)

Did this page help you?