org.eclipse.collections.impl.block.factory.Functions.getPassThru()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(6.6k)|赞(0)|评价(0)|浏览(81)

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

Functions.getPassThru介绍

[英]Alias for identity(). Inlineable.
[中]identity()的别名。内联的。

代码示例

代码示例来源:origin: com.goldmansachs.obevo/obevo-db-mssql

@Override
public Function<String, String> convertDbObjectName() {
  return Functions.getPassThru();
}

代码示例来源:origin: goldmansachs/obevo

@Override
public Function<String, String> convertDbObjectName() {
  return Functions.getPassThru();
}

代码示例来源:origin: goldmansachs/obevo

@Override
public Function<String, String> convertDbObjectName() {
  return Functions.getPassThru();
}

代码示例来源:origin: com.goldmansachs.obevo/obevo-db-sybase-ase

@Override
public Function<String, String> convertDbObjectName() {
  return Functions.getPassThru();
}

代码示例来源:origin: goldmansachs/obevo

@Override
public Function<String, String> convertDbObjectName() {
  return Functions.getPassThru();
}

代码示例来源:origin: com.goldmansachs.obevo/obevo-core

@Override
  public Iterable<Pair<T, SortableDependency>> valueOf(T group) {
    return group.getComponents().collect(Functions.pair(Functions.getFixedValue(group), Functions.<SortableDependency>getPassThru()));
  }
});

代码示例来源:origin: goldmansachs/obevo

@Override
  public Iterable<Pair<T, SortableDependency>> valueOf(T group) {
    return group.getComponents().collect(Functions.pair(Functions.getFixedValue(group), Functions.<SortableDependency>getPassThru()));
  }
});

代码示例来源: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();
}

代码示例来源: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: com.goldmansachs.obevo/obevo-db

appContext.cleanAndDeploy();
final MutableMap<PhysicalSchema, ImmutableCollection<DaTable>> regularTableMap = physicalSchemas.toMap(Functions.<PhysicalSchema>getPassThru(), new Function<PhysicalSchema, ImmutableCollection<DaTable>>() {
  @Override
  public ImmutableCollection<DaTable> valueOf(PhysicalSchema object) {
final MutableMap<PhysicalSchema, ImmutableCollection<DaTable>> baselineTableMap = physicalSchemas.toMap(Functions.<PhysicalSchema>getPassThru(), new Function<PhysicalSchema, ImmutableCollection<DaTable>>() {
  @Override
  public ImmutableCollection<DaTable> valueOf(PhysicalSchema object) {

代码示例来源:origin: goldmansachs/obevo

appContext.cleanAndDeploy();
final MutableMap<PhysicalSchema, ImmutableCollection<DaTable>> regularTableMap = physicalSchemas.toMap(Functions.<PhysicalSchema>getPassThru(), new Function<PhysicalSchema, ImmutableCollection<DaTable>>() {
  @Override
  public ImmutableCollection<DaTable> valueOf(PhysicalSchema object) {
final MutableMap<PhysicalSchema, ImmutableCollection<DaTable>> baselineTableMap = physicalSchemas.toMap(Functions.<PhysicalSchema>getPassThru(), new Function<PhysicalSchema, ImmutableCollection<DaTable>>() {
  @Override
  public ImmutableCollection<DaTable> valueOf(PhysicalSchema object) {

代码示例来源:origin: com.goldmansachs.obevo/obevo-db

this.platform = platform;
this.physicalSchemas = physicalSchemas;
this.nextIdBySchema = physicalSchemas.toMap(Functions.<PhysicalSchema>getPassThru(), new Function<PhysicalSchema, MutableInt>() {
  @Override
  public MutableInt valueOf(PhysicalSchema object) {

代码示例来源:origin: com.goldmansachs.obevo/obevo-mongodb

this.nextIdBySchema = env.getPhysicalSchemas().toMap(Functions.<PhysicalSchema>getPassThru(), new Function<PhysicalSchema, MutableInt>() {
  @Override
  public MutableInt valueOf(PhysicalSchema object) {

代码示例来源:origin: goldmansachs/obevo

this.nextIdBySchema = env.getPhysicalSchemas().toMap(Functions.<PhysicalSchema>getPassThru(), new Function<PhysicalSchema, MutableInt>() {
  @Override
  public MutableInt valueOf(PhysicalSchema object) {

代码示例来源:origin: goldmansachs/obevo

this.platform = platform;
this.physicalSchemas = physicalSchemas;
this.nextIdBySchema = physicalSchemas.toMap(Functions.<PhysicalSchema>getPassThru(), new Function<PhysicalSchema, MutableInt>() {
  @Override
  public MutableInt valueOf(PhysicalSchema object) {

相关文章