Class ScopesContainer

    • Field Detail

      • simpleScopes

        @Nonnull
        private Set<String> simpleScopes
        The (non Regexp) scopes.
    • Constructor Detail

      • ScopesContainer

        public ScopesContainer()
    • Method Detail

      • setSimpleScopes

        public void setSimpleScopes​(@Nullable
                                    Set<String> scopes)
        Sets the non-regexp Scopes.
        We force the input to be a set so as to enforce no duplicates and any performance hit as a result.
        Parameters:
        scopes - what to set.
      • setRegexpScopes

        public void setRegexpScopes​(@Nullable
                                    Set<String> scopes)
        Sets the regexp scopes.
        We force the input to be a set so as to enforce no duplicates and any performance hit as a result.
        Parameters:
        scopes - what to set.
      • matchesScope

        public boolean matchesScope​(@Nonnull @NotEmpty
                                    String scope)
        Does the provided string match the scopes for this XMLObject?

        We test first against the non regexp scopes for the sake of performance.

        Parameters:
        scope - what to test.
        Returns:
        whether it matches any of the scopes.