org.jvnet.hk2.component.MultiMap.getFirst()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(89)

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

MultiMap.getFirst介绍

暂无

代码示例

代码示例来源:origin: hstaudacher/osgi-jax-rs-connector

/**
 * Gets the first value if any, or null.
 * <p/>
 * This is useful when you know the given key only has one value and you'd like
 * to get to that value.
 *
 * @param k key for the values
 * @return null if the key has no values or it has a value but the value is null.
 */
public V getOne(K k) {
  return getFirst(k);
}

代码示例来源:origin: com.sun.enterprise/auto-depends

/**
 * Gets the first value if any, or null.
 * <p/>
 * This is useful when you know the given key only has one value and you'd like
 * to get to that value.
 *
 * @param k key for the values
 * @return null if the key has no values or it has a value but the value is null.
 */
public V getOne(K k) {
  return getFirst(k);
}

代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all

/**
 * Gets the first value if any, or null.
 * <p/>
 * This is useful when you know the given key only has one value and you'd like
 * to get to that value.
 *
 * @param k key for the values
 * @return null if the key has no values or it has a value but the value is null.
 */
public V getOne(K k) {
  return getFirst(k);
}

代码示例来源:origin: javaee/hk2

/**
 * Gets the first value if any, or null.
 * <p/>
 * This is useful when you know the given key only has one value and you'd like
 * to get to that value.
 *
 * @param k key for the values
 * @return null if the key has no values or it has a value but the value is null.
 */
public V getOne(K k) {
  return getFirst(k);
}

代码示例来源:origin: org.glassfish.hk2/auto-depends

/**
 * Gets the first value if any, or null.
 * <p/>
 * This is useful when you know the given key only has one value and you'd like
 * to get to that value.
 *
 * @param k key for the values
 * @return null if the key has no values or it has a value but the value is null.
 */
public V getOne(K k) {
  return getFirst(k);
}

代码示例来源:origin: hstaudacher/osgi-jax-rs-connector

/**
 * Gets the first value if any, or null.
 * <p/>
 * This is useful when you know the given key only has one value and you'd like
 * to get to that value.
 *
 * @param k key for the values
 * @return null if the key has no values or it has a value but the value is null.
 */
public V getOne(K k) {
  return getFirst(k);
}

代码示例来源:origin: org.glassfish.hk2/auto-depends

/**
 * narrow down and return the collection for those runLevelScopes that match
 */
@SuppressWarnings("unchecked")
protected <T> Collection<T> narrow(Collection<Inhabitant<T>> inhabs) {
  if (inhabs.isEmpty()) {
    return Collections.emptySet();
  }
  
  // narrow the listeners to only our run level scope
  Collection<T> services = new ArrayList<T>();
  for (Inhabitant<?> i : inhabs) {
    String scope = i.metadata().getFirst(RunLevel.META_SCOPE_TAG);
    if (null == scope || scope.equals(targetScope.getName())) {
      services.add((T) i.get());
    }
  }
  
  return services;
}

相关文章