本文整理了Java中org.jvnet.hk2.component.MultiMap._get()
方法的一些代码示例,展示了MultiMap._get()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MultiMap._get()
方法的具体详情如下:
包路径:org.jvnet.hk2.component.MultiMap
类名称:MultiMap
方法名:_get
[英]Package private (for getting the raw map for direct manipulation by the habitat)
[中]私人软件包(用于获取原始地图,供栖息地直接操作)
代码示例来源:origin: hstaudacher/osgi-jax-rs-connector
/**
* Checks if the map contains the given key(s), also extending the search
* to including the sub collection.
*
* @param k1 key from top collection
* @param k2 key (value) from inner collection
* @return true if the map contains at least one element for these keys
*/
public boolean contains(K k1, V k2) {
List<V> list = _get(k1);
return list.contains(k2);
}
代码示例来源:origin: hstaudacher/osgi-jax-rs-connector
/**
* Checks if the map contains the given key(s), also extending the search
* to including the sub collection.
*
* @param k1 key from top collection
* @param k2 key (value) from inner collection
* @return true if the map contains at least one element for these keys
*/
public boolean contains(K k1, V k2) {
List<V> list = _get(k1);
return list.contains(k2);
}
代码示例来源:origin: javaee/hk2
/**
* Checks if the map contains the given key(s), also extending the search
* to including the sub collection.
*
* @param k1 key from top collection
* @param k2 key (value) from inner collection
* @return true if the map contains at least one element for these keys
*/
public boolean contains(K k1, V k2) {
List<V> list = _get(k1);
return list.contains(k2);
}
代码示例来源:origin: org.glassfish.hk2/auto-depends
/**
* Checks if the map contains the given key(s), also extending the search
* to including the sub collection.
*
* @param k1 key from top collection
* @param k2 key (value) from inner collection
* @return true if the map contains at least one element for these keys
*/
@Override
public boolean contains(K k1, V k2) {
List<V> list = _get(k1);
return list.contains(k2);
}
代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all
/**
* Checks if the map contains the given key(s), also extending the search
* to including the sub collection.
*
* @param k1 key from top collection
* @param k2 key (value) from inner collection
* @return true if the map contains at least one element for these keys
*/
public boolean contains(K k1, V k2) {
List<V> list = _get(k1);
return list.contains(k2);
}
代码示例来源:origin: com.sun.enterprise/auto-depends
/**
* Checks if the map contains the given key(s), also extending the search
* to including the sub collection.
*
* @param k1 key from top collection
* @param k2 key (value) from inner collection
* @return true if the map contains at least one element for these keys
*/
@Override
public boolean contains(K k1, V k2) {
List<V> list = _get(k1);
return list.contains(k2);
}
代码示例来源:origin: com.sun.enterprise/auto-depends
/**
* Get the first inhabitant by contract
*
* @param typeName fullyQualifiedClassName
* @return
*/
public Inhabitant<?> getInhabitantByContract(String typeName) {
final List<NamedInhabitant> services = byContract._get(typeName);
return (null == services || services.isEmpty()) ? null : services
.get(0).inhabitant;
}
代码示例来源:origin: org.glassfish.hk2/auto-depends
/**
* Get the first inhabitant by contract
*
* @param typeName fullyQualifiedClassName
* @return
*/
public Inhabitant<?> getInhabitantByContract(String typeName) {
final List<NamedInhabitant> services = byContract._get(typeName);
return (null == services || services.isEmpty()) ? null : services
.get(0).inhabitant;
}
代码示例来源:origin: com.sun.enterprise/auto-depends
final List<NamedInhabitant> contracted = byContract._get(index);
if (!contracted.isEmpty()) {
Iterator<NamedInhabitant> iter = contracted.iterator();
代码示例来源:origin: org.glassfish.hk2/auto-depends
final List<NamedInhabitant> contracted = byContract._get(index);
if (!contracted.isEmpty()) {
Iterator<NamedInhabitant> iter = contracted.iterator();
代码示例来源:origin: com.sun.enterprise/auto-depends
/**
* Removes a Contracted service
*
* @param index the contract name
* @param serviceOrInhabitant the service instance, or an Inhabitant instance
*/
public boolean removeIndex(String index, Object serviceOrInhabitant) {
boolean removed = false;
if (byContract.containsKey(index)) {
List<NamedInhabitant> contracted = byContract._get(index);
Iterator<NamedInhabitant> iter = contracted.iterator();
while (iter.hasNext()) {
NamedInhabitant i = iter.next();
if (matches(i.inhabitant, serviceOrInhabitant)) {
if (concurrencyControls) {
removed = contracted.remove(i);
assert (removed);
} else {
iter.remove();
}
removed = true;
notify(i.inhabitant, EventType.INHABITANT_INDEX_REMOVED,
index, null, service(serviceOrInhabitant), null);
// remember to remove the components stored under its type
remove(i.inhabitant);
}
}
}
return removed;
}
代码示例来源:origin: org.glassfish.hk2/auto-depends
/**
* Removes a Contracted service
*
* @param index the contract name
* @param serviceOrInhabitant the service instance, or an Inhabitant instance
*/
public boolean removeIndex(String index, Object serviceOrInhabitant) {
boolean removed = false;
if (byContract.containsKey(index)) {
List<NamedInhabitant> contracted = byContract._get(index);
Iterator<NamedInhabitant> iter = contracted.iterator();
while (iter.hasNext()) {
NamedInhabitant i = iter.next();
if (matches(i.inhabitant, serviceOrInhabitant)) {
if (concurrencyControls) {
removed = contracted.remove(i);
assert (removed);
} else {
iter.remove();
}
removed = true;
notify(i.inhabitant, EventType.INHABITANT_INDEX_REMOVED,
index, null, service(serviceOrInhabitant), null);
// remember to remove the components stored under its type
remove(i.inhabitant);
}
}
}
return removed;
}
代码示例来源:origin: org.glassfish.hk2/auto-depends
List<Inhabitant> list = byType._get(HabitatListener.class.getName());
List<Inhabitant> releaseList = new ArrayList<Inhabitant>();
Iterator<Inhabitant> iter = list.iterator();
代码示例来源:origin: com.sun.enterprise/auto-depends
List<Inhabitant> list = byType._get(HabitatListener.class.getName());
List<Inhabitant> releaseList = new ArrayList<Inhabitant>();
Iterator<Inhabitant> iter = list.iterator();
内容来源于网络,如有侵权,请联系作者删除!