本文整理汇总了Java中org.eclipse.collections.api.list.MutableList.detect方法的典型用法代码示例。如果您正苦于以下问题:Java MutableList.detect方法的具体用法?Java MutableList.detect怎么用?Java MutableList.detect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.collections.api.list.MutableList
的用法示例。
在下文中一共展示了MutableList.detect方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: test2
import org.eclipse.collections.api.list.MutableList; //导入方法依赖的package包/类
/**
* This one has no default specified for autoReorgEnabled
*/
@Test
public void test2() {
DbEnvironmentXmlEnricher enricher = new DbEnvironmentXmlEnricher();
DeploySystem system = enricher.readSystem(FileRetrievalMode.FILE_SYSTEM
.resolveSingleFileObject("./src/test/resources/DbEnvironmentXmlEnricher/system-config-test2.xml"));
MutableList<DbEnvironment> envs = system.getEnvironments().toList().sortThisBy(Environment.TO_NAME);
DbEnvironment env1 = envs.detect(Predicates.attributeEqual(Environment.TO_NAME, "test1"));
Schema schema = env1.getSchemas().detect(Predicates.attributeEqual(
Schema.TO_NAME, "DEPLOY_TRACKER"));
assertTrue(schema.getObjectExclusionPredicateBuilder().getObjectNamesByType().isEmpty());
assertEquals("DEPLOY_TRACKER", env1.getPhysicalSchema("DEPLOY_TRACKER").getPhysicalName());
assertEquals(Lists.mutable.of(
FileRetrievalMode.FILE_SYSTEM.resolveSingleFileObject("src/test/resources/DbEnvironmentXmlEnricher")
), env1.getSourceDirs());
assertEquals(Sets.mutable.with("DACT_RO", "DACT_RO_BATCH1", "DACT_RO_BATCH2", "DACT_RW", "DACT_RW_BATCH1", "DACT_RW_BATCH2"), env1.getGroups().collect(Group.TO_NAME).toSet());
assertEquals(Sets.mutable.with("CMDRRWDB", "CMDRRODB"), env1.getUsers().collect(User.TO_NAME).toSet());
assertEquals(DbEnvironmentXmlEnricherTest2DbPlatform.class, env1.getPlatform().getClass());
assertTrue(env1.isAutoReorgEnabled());
assertEquals(',', env1.getDataDelimiter());
assertEquals("null", env1.getNullToken());
assertEquals(1, env1.getSourceDirs().size());
assertEquals(Sets.immutable.with("ext1", "ext2"), env1.getAcceptedExtensions());
}
示例2: getChangeType
import org.eclipse.collections.api.list.MutableList; //导入方法依赖的package包/类
/**
* Internal method meant to help subclasses modify the changeType list.
*/
protected DbChangeType getChangeType(MutableList<ChangeType> inputs, String changeTypeName) {
return (DbChangeType) inputs.detect(Predicates.attributeEqual(ChangeType.TO_NAME, changeTypeName));
}