org.wildfly.security.authz.Attributes.indexOf()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(132)

本文整理了Java中org.wildfly.security.authz.Attributes.indexOf()方法的一些代码示例,展示了Attributes.indexOf()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Attributes.indexOf()方法的具体详情如下:
包路径:org.wildfly.security.authz.Attributes
类名称:Attributes
方法名:indexOf

Attributes.indexOf介绍

[英]Get the index of the first occurrence of the given value at the given key, if any.
[中]获取给定值在给定键处第一次出现的索引(如果有)。

代码示例

代码示例来源:origin: wildfly/wildfly

/**
 * Determine if the given key has a mapping for the given value in this collection.
 *
 * @param key the key
 * @param value the value
 * @return {@code true} if the key has a mapping to the given value, {@code false} otherwise
 */
default boolean containsValue(String key, String value) {
  return key != null && value != null && indexOf(key, value) >= 0;
}

代码示例来源:origin: wildfly/wildfly

public int indexOf(final Object o) {
  return o instanceof String ? attributes.indexOf(key, (String) o) : -1;
}

代码示例来源:origin: wildfly/wildfly

/**
 * Remove the first occurrence of the given value under the given key, if any.
 *
 * @param key the key
 * @param value the value to remove
 * @return {@code true} if the value was found and removed, {@code false} otherwise
 */
default boolean removeFirst(String key, String value) {
  final int idx = indexOf(key, value);
  return idx >= 0 && remove(key, idx, value);
}

代码示例来源:origin: org.wildfly.security/wildfly-elytron

/**
 * Determine if the given key has a mapping for the given value in this collection.
 *
 * @param key the key
 * @param value the value
 * @return {@code true} if the key has a mapping to the given value, {@code false} otherwise
 */
default boolean containsValue(String key, String value) {
  return key != null && value != null && indexOf(key, value) >= 0;
}

代码示例来源:origin: org.wildfly.security/wildfly-elytron-auth-server

/**
 * Determine if the given key has a mapping for the given value in this collection.
 *
 * @param key the key
 * @param value the value
 * @return {@code true} if the key has a mapping to the given value, {@code false} otherwise
 */
default boolean containsValue(String key, String value) {
  return key != null && value != null && indexOf(key, value) >= 0;
}

代码示例来源:origin: org.wildfly.security/wildfly-elytron

public int indexOf(final Object o) {
  return o instanceof String ? attributes.indexOf(key, (String) o) : -1;
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

/**
 * Determine if the given key has a mapping for the given value in this collection.
 *
 * @param key the key
 * @param value the value
 * @return {@code true} if the key has a mapping to the given value, {@code false} otherwise
 */
default boolean containsValue(String key, String value) {
  return key != null && value != null && indexOf(key, value) >= 0;
}

代码示例来源:origin: org.wildfly.security/wildfly-elytron-auth-server

public int indexOf(final Object o) {
  return o instanceof String ? attributes.indexOf(key, (String) o) : -1;
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

public int indexOf(final Object o) {
  return o instanceof String ? attributes.indexOf(key, (String) o) : -1;
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

/**
 * Remove the first occurrence of the given value under the given key, if any.
 *
 * @param key the key
 * @param value the value to remove
 * @return {@code true} if the value was found and removed, {@code false} otherwise
 */
default boolean removeFirst(String key, String value) {
  final int idx = indexOf(key, value);
  return idx >= 0 && remove(key, idx, value);
}

代码示例来源:origin: org.wildfly.security/wildfly-elytron

/**
 * Remove the first occurrence of the given value under the given key, if any.
 *
 * @param key the key
 * @param value the value to remove
 * @return {@code true} if the value was found and removed, {@code false} otherwise
 */
default boolean removeFirst(String key, String value) {
  final int idx = indexOf(key, value);
  return idx >= 0 && remove(key, idx, value);
}

代码示例来源:origin: org.wildfly.security/wildfly-elytron-auth-server

/**
 * Remove the first occurrence of the given value under the given key, if any.
 *
 * @param key the key
 * @param value the value to remove
 * @return {@code true} if the value was found and removed, {@code false} otherwise
 */
default boolean removeFirst(String key, String value) {
  final int idx = indexOf(key, value);
  return idx >= 0 && remove(key, idx, value);
}

相关文章