congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Arrays2.containsAny
Code IndexAdd Tabnine to your IDE (free)

How to use
containsAny
method
in
leap.lang.Arrays2

Best Java code snippets using leap.lang.Arrays2.containsAny (Showing top 4 results out of 315)

origin: org.leapframework/leap-websecurity

@Override
public boolean hasAnyRole(String... roles) {
  return Arrays2.containsAny(this.roles, roles);
}
origin: org.leapframework/leap-websecurity

@Override
public boolean checkPermissionImplies(String[] checkingPermission, String impliedByPermission) {
  for(PermissionChecker checker : checkers) {
    if(checker.checkPermissionImplies(checkingPermission, impliedByPermission)) {
      return true;
    }
  }
  return Arrays2.containsAny(checkingPermission,impliedByPermission);
}
origin: org.leapframework/leap-websecurity

protected final boolean checkRoles(AuthorizationContext context, String[] roles) {
  if(null != roles && roles.length > 0) {
    boolean allow = false;
    String[] grantedRoles = context.getAuthentication().getRoles();
    if(null != grantedRoles && grantedRoles.length > 0) {
      allow = Arrays2.containsAny(grantedRoles,roles);
    }
    if(!allow) {
      allow = context.getAuthorization().hasAnyRole(roles);
    }
    if(!allow) {
      return false;
    }
  }
  return true;
}
origin: org.leapframework/leap-webapi

private boolean checkProfile(MApiOperation o) {
  if(null == o.getRoute()) {
    return false;
  }
  String[] profiles = tryGetProfiles(o);
  if(null != profiles) {
    Request request = Request.tryGetCurrent();
    if (null != request) {
      String requestProfile = request.getParameter("profile");
      if (Strings.isNotBlank(requestProfile)) {
        if(!Arrays2.containsAny(profiles, requestProfile)) {
          return true;
        }
      }
    }
  }
  return false;
}
leap.langArrays2containsAny

Popular methods of Arrays2

  • isEmpty
  • contains
  • concat
  • equals
  • containsInObjectArray
  • indexOf
  • isNotEmpty
  • copyOf
    Copies the specified array to an new array.
  • filter
    Returns the elements of unfiltered that satisfy a predicate.
  • firstOrNull
    Returns the first element in iterable that satisfies the given predicate. if such an element exists.
  • indexOfObjectArray
  • lastIndexOf
  • indexOfObjectArray,
  • lastIndexOf,
  • sort,
  • toIntArray

Popular in Java

  • Creating JSON documents from java classes using gson
  • getExternalFilesDir (Context)
  • startActivity (Activity)
  • getSharedPreferences (Context)
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • JCheckBox (javax.swing)
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now