本文整理了Java中java.util.concurrent.ConcurrentHashMap.containsValue()
方法的一些代码示例,展示了ConcurrentHashMap.containsValue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ConcurrentHashMap.containsValue()
方法的具体详情如下:
包路径:java.util.concurrent.ConcurrentHashMap
类名称:ConcurrentHashMap
方法名:containsValue
[英]Returns true if this map maps one or more keys to the specified value. Note: This method requires a full internal traversal of the hash table, and so is much slower than method containsKey.
[中]
代码示例来源:origin: apache/incubator-dubbo
@Override
public boolean containsValue(Object value) {
return delegateMap.containsValue(value);
}
代码示例来源:origin: apache/incubator-dubbo
@Override
public boolean containsValue(Object value) {
return delegateMap.containsValue(value);
}
代码示例来源:origin: ben-manes/caffeine
@Override
public boolean containsValue(Object value) {
return data.containsValue(value);
}
代码示例来源:origin: wildfly/wildfly
public boolean containsValue(final Object value) {
return backingMap.containsValue(value);
}
代码示例来源:origin: org.codehaus.groovy/groovy
@Override
public boolean containsValue(Object value) {
return map.containsValue(value);
}
代码示例来源:origin: robovm/robovm
/**
* Legacy method testing if some key maps into the specified value
* in this table. This method is identical in functionality to
* {@link #containsValue}, and exists solely to ensure
* full compatibility with class {@link java.util.Hashtable},
* which supported this method prior to introduction of the
* Java Collections framework.
*
* @param value a value to search for
* @return <tt>true</tt> if and only if some key maps to the
* <tt>value</tt> argument in this table as
* determined by the <tt>equals</tt> method;
* <tt>false</tt> otherwise
* @throws NullPointerException if the specified value is null
*/
public boolean contains(Object value) {
return containsValue(value);
}
代码示例来源:origin: protostuff/protostuff
@Override
public boolean containsValue(Object value)
{
return voProperties.containsValue(value);
}
代码示例来源:origin: spotbugs/spotbugs
@NoWarning("GC_UNRELATED_TYPES")
public boolean testContainsValueConcurrentHashMap(Integer i) {
return concurrentHashMap.containsValue(i);
}
代码示例来源:origin: spotbugs/spotbugs
@ExpectWarning("GC_UNRELATED_TYPES")
public boolean testContainsValueConcurrentHashMap(String s) {
return concurrentHashMap.containsValue(s);
}
代码示例来源:origin: apache/hbase
/**
* Add a remote rpc.
* @param key the node identifier
*/
public void addOperationToNode(final TRemote key, RemoteProcedure rp)
throws NullTargetServerDispatchException, NoServerDispatchException, NoNodeDispatchException {
if (key == null) {
throw new NullTargetServerDispatchException(rp.toString());
}
BufferNode node = nodeMap.get(key);
if (node == null) {
// If null here, it means node has been removed because it crashed. This happens when server
// is expired in ServerManager. ServerCrashProcedure may or may not have run.
throw new NoServerDispatchException(key.toString() + "; " + rp.toString());
}
node.add(rp);
// Check our node still in the map; could have been removed by #removeNode.
if (!nodeMap.containsValue(node)) {
throw new NoNodeDispatchException(key.toString() + "; " + rp.toString());
}
}
代码示例来源:origin: com.github.ben-manes.caffeine/caffeine
@Override
public boolean containsValue(Object value) {
return data.containsValue(value);
}
代码示例来源:origin: org.apache.mina/mina-core
/**
* {@inheritDoc}
*/
@Override
public boolean containsValue(Object value) {
return delegate.containsValue(value);
}
代码示例来源:origin: org.apache.directory.api/api-ldap-client-all
/**
* {@inheritDoc}
*/
@Override
public boolean containsValue(Object value) {
return delegate.containsValue(value);
}
代码示例来源:origin: com.github.tianjing/tgtools.web.develop
/**
* 是否存在用户连接
*
* @param pWebSocketSession 连接对象
*
* @return
*/
public boolean hasClient(WebSocketSession pWebSocketSession) {
return mClients.containsValue(pWebSocketSession);
}
代码示例来源:origin: JRakNet/JRakNet
/**
* Returns <tt>true</tt> if this map maps one or more keys to the specified
* value.
*
* @param value
* value whose presence in this map is to be tested
* @return <tt>true</tt> if this map maps one or more keys to the specified
* value
*/
public boolean containsValue(Object value) {
return super.containsValue(value);
}
代码示例来源:origin: JRakNet/JRakNet
/**
* Returns <tt>true</tt> if this map maps one or more keys to the specified
* value.
*
* @param value
* value whose presence in this map is to be tested
* @return <tt>true</tt> if this map maps one or more keys to the specified
* value
*/
public boolean containsValue(Object value) {
return super.containsValue(value);
}
代码示例来源:origin: JRakNet/JRakNet
/**
* Returns <tt>true</tt> if this map maps one or more keys to the specified
* value.
*
* @param value
* value whose presence in this map is to be tested
* @return <tt>true</tt> if this map maps one or more keys to the specified
* value
*/
public boolean containsValue(Object value) {
return super.containsValue(value);
}
代码示例来源:origin: org.sonatype.nexus/nexus-appcontext
public boolean containsValue(Object val, boolean fallBackToParent) {
boolean result = delegate.containsValue(val);
if (fallBackToParent && !result && getParent() != null) {
result = getParent().containsValue(val);
}
return result;
}
代码示例来源:origin: org.apache.sandesha2/sandesha2-core
protected T findUnique (T matchInfo) throws SandeshaStorageException {
if(LoggingControl.isAnyTracingEnabled() && log.isDebugEnabled()) log.debug("Entry: InMemoryBeanMgr " + this.getClass() + " findUnique " + matchInfo);
T result = findUniqueNoLock(matchInfo);
// Now we have a point-in-time view of the bean, lock it, and double
// check that it is still in the table
if(result != null) {
mgr.enlistBean(result);
if(!table.containsValue(result)) result = null;
}
if(LoggingControl.isAnyTracingEnabled() && log.isDebugEnabled()) log.debug("Exit: InMemoryBeanMgr " + this.getClass() + " findUnique " + result);
return result;
}
代码示例来源:origin: org.sonatype.appcontext/appcontext
public boolean containsValue( Object val, boolean fallBackToParent )
{
boolean result = super.containsValue( val );
if ( fallBackToParent && !result && getParent() != null )
{
result = getParent().containsValue( val );
}
return result;
}
内容来源于网络,如有侵权,请联系作者删除!