本文整理了Java中org.eclipse.collections.api.map.MutableMap.flip()
方法的一些代码示例,展示了MutableMap.flip()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MutableMap.flip()
方法的具体详情如下:
包路径:org.eclipse.collections.api.map.MutableMap
类名称:MutableMap
方法名:flip
暂无
代码示例来源:origin: eclipse/eclipse-collections
@Override
public MutableSetMultimap<V, K> flip()
{
synchronized (this.lock)
{
return this.getDelegate().flip();
}
}
代码示例来源:origin: eclipse/eclipse-collections
@Override
public MutableSetMultimap<V, K> flip()
{
return this.getMutableMap().flip();
}
代码示例来源:origin: eclipse/eclipse-collections
@Override
public MutableSetMultimap<V, K> flip()
{
return this.getMutableMap().flip();
}
代码示例来源:origin: eclipse/eclipse-collections
@Override
public MutableSetMultimap<V, K> flip()
{
synchronized (this.lock)
{
return this.getDelegate().flip();
}
}
代码示例来源:origin: org.eclipse.collections/eclipse-collections
@Override
public MutableSetMultimap<V, K> flip()
{
return this.getMutableMap().flip();
}
代码示例来源:origin: org.eclipse.collections/eclipse-collections
@Override
public MutableSetMultimap<V, K> flip()
{
synchronized (this.lock)
{
return this.getDelegate().flip();
}
}
代码示例来源:origin: com.goldmansachs.obevo/obevo-core
/**
* Returns true/false if all the schemas in the environment either need rollback (true) or don't (false).
*
* If some do and some don't, an exception is thrown.
*/
@Override
public boolean determineRollback(final String productVersion, final ImmutableSet<String> schemas, final DeployExecutionDao deployExecutionDao) {
MutableMap<String, Boolean> rollbackFlags = schemas.toMap(
Functions.<String>getPassThru(),
new Function<String, Boolean>() {
@Override
public Boolean valueOf(String schema) {
LOG.info("Checking rollback status on Product Version {} and Schema {}", productVersion, schema);
return DefaultRollbackDetector.this.determineRollbackForSchema(productVersion, deployExecutionDao.getDeployExecutions(schema));
}
}
);
MutableSet<Boolean> values = rollbackFlags.valuesView().toSet();
if (values.size() > 1) {
MutableSetMultimap<Boolean, String> schemasByRollbackFlag = rollbackFlags.flip();
MutableSet<String> rollbackSchemas = schemasByRollbackFlag.get(Boolean.TRUE);
MutableSet<String> nonrollbackSchemas = schemasByRollbackFlag.get(Boolean.FALSE);
throw new IllegalArgumentException("The following schemas were calculated for rollback [" + rollbackSchemas + "], though the rest were not [" + nonrollbackSchemas + "]; cannot proceed in this mixed mode");
}
return values.iterator().next().booleanValue();
}
代码示例来源:origin: goldmansachs/obevo
/**
* Returns true/false if all the schemas in the environment either need rollback (true) or don't (false).
*
* If some do and some don't, an exception is thrown.
*/
@Override
public boolean determineRollback(final String productVersion, final ImmutableSet<String> schemas, final DeployExecutionDao deployExecutionDao) {
MutableMap<String, Boolean> rollbackFlags = schemas.toMap(
Functions.<String>getPassThru(),
new Function<String, Boolean>() {
@Override
public Boolean valueOf(String schema) {
LOG.info("Checking rollback status on Product Version {} and Schema {}", productVersion, schema);
return DefaultRollbackDetector.this.determineRollbackForSchema(productVersion, deployExecutionDao.getDeployExecutions(schema));
}
}
);
MutableSet<Boolean> values = rollbackFlags.valuesView().toSet();
if (values.size() > 1) {
MutableSetMultimap<Boolean, String> schemasByRollbackFlag = rollbackFlags.flip();
MutableSet<String> rollbackSchemas = schemasByRollbackFlag.get(Boolean.TRUE);
MutableSet<String> nonrollbackSchemas = schemasByRollbackFlag.get(Boolean.FALSE);
throw new IllegalArgumentException("The following schemas were calculated for rollback [" + rollbackSchemas + "], though the rest were not [" + nonrollbackSchemas + "]; cannot proceed in this mixed mode");
}
return values.iterator().next().booleanValue();
}
内容来源于网络,如有侵权,请联系作者删除!