Java Collection Element Get getAuthzNameFromEntityName(String entityName, Collection authzProvidersNames)

Here you can find the source of getAuthzNameFromEntityName(String entityName, Collection authzProvidersNames)

Description

get Authz Name From Entity Name

License

Apache License

Declaration

public static String getAuthzNameFromEntityName(String entityName, Collection<String> authzProvidersNames) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.util.Collection;

public class Main {
    public static String getAuthzNameFromEntityName(String entityName, Collection<String> authzProvidersNames) {
        String result = null;/*from w w  w  . j  ava 2s.  co  m*/
        if (entityName != null && entityName.contains("@")) {
            String lastPart = entityName.substring(entityName.lastIndexOf('@') + 1);
            result = authzProvidersNames.contains(lastPart) ? lastPart : null;
        }
        return result;
    }
}

Related

  1. getArrays(Object parent, Collection collection)
  2. getAssociationCollectionObjectName(Collection currentObjectColl, Collection prevObjectColl)
  3. getAsString(Collection data, char seperator)
  4. getAsString(Collection input)
  5. getAt(Collection col, int index)
  6. getByIndex(Collection availableTransitions, int index)
  7. getByIndex(Collection vals, int idx)
  8. getByMostFrequent(Collection collection)
  9. getCardinalityMap(final Collection col)

  10. HOME | Copyright © www.java2s.com 2016