本文整理汇总了Java中org.eclipse.collections.impl.map.mutable.UnifiedMap类的典型用法代码示例。如果您正苦于以下问题:Java UnifiedMap类的具体用法?Java UnifiedMap怎么用?Java UnifiedMap使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UnifiedMap类属于org.eclipse.collections.impl.map.mutable包,在下文中一共展示了UnifiedMap类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: verifyRegular
import org.eclipse.collections.impl.map.mutable.UnifiedMap; //导入依赖的package包/类
private void verifyRegular(TextMarkupDocument doc) {
ImmutableList<TextMarkupDocumentSection> sections = doc.getSections();
assertEquals(6, sections.size());
this.assertSection(sections.get(0), TextMarkupDocumentReader.TAG_METADATA, null,
UnifiedMap.<String, String>newWithKeysValues("k1", "v1", "k2", "v2"));
this.assertSection(sections.get(1), TextMarkupDocumentReader.TAG_METADATA, null,
UnifiedMap.<String, String>newWithKeysValues("k3", "v3"));
// assertSection(sections.get(2), null, "blahblahblah\n", UnifiedMap.<String, String>newMap());
this.assertSection(sections.get(2), TextMarkupDocumentReader.TAG_CHANGE, "line1\nline2/*comment to keep */\r\nline3",
UnifiedMap.<String, String>newWithKeysValues("n", "1", "a", "2", "v", "3"));
this.assertSection(sections.get(3), TextMarkupDocumentReader.TAG_CHANGE, null, UnifiedMap.<String, String>newWithKeysValues("n", "2"),
UnifiedSet.newSetWith("TOGGLEACTIVE"));
this.assertSection(sections.get(4), TextMarkupDocumentReader.TAG_CHANGE, "finalcontent",
UnifiedMap.<String, String>newWithKeysValues("n", "3"));
this.assertSection(sections.get(4).getSubsections().get(0),
TextMarkupDocumentReader.TAG_ROLLBACK_IF_ALREADY_DEPLOYED, "rollback content",
UnifiedMap.<String, String>newWithKeysValues("n", "3"));
this.assertSection(sections.get(5), TextMarkupDocumentReader.TAG_CHANGE, null, UnifiedMap.<String, String>newWithKeysValues("n", "4"));
}
开发者ID:goldmansachs,项目名称:obevo,代码行数:20,代码来源:TextMarkupDocumentReaderTest.java
示例2: verify
import org.eclipse.collections.impl.map.mutable.UnifiedMap; //导入依赖的package包/类
/**
* Verifies a map of table names to actual tables.
*
* @param actualTables - actual tables by name
*/
public final void verify(Map<String, VerifiableTable> actualTables)
{
this.runPreVerifyChecks();
this.makeSureDirectoriesAreNotSame();
if (this.isRebasing)
{
this.newRebaser().rebase(this.description.getMethodName(), adaptAndFilterTables(actualTables, this.actualAdapter), this.getExpectedFile());
}
else
{
if (this.expectedTables == null)
{
ExpectedResults expectedResults = getExpectedResults();
this.expectedTables = UnifiedMap.newMap(expectedResults.getTables(this.description.getMethodName()));
this.expectedMetadata = expectedResults.getMetadata();
}
Map<String, VerifiableTable> expectedTablesToVerify = new LinkedHashMap<>(actualTables.size());
for (String actualTableName : actualTables.keySet())
{
expectedTablesToVerify.put(actualTableName, this.expectedTables.remove(actualTableName));
}
this.verifyTables(expectedTablesToVerify, actualTables, this.expectedMetadata);
}
}
开发者ID:goldmansachs,项目名称:tablasco,代码行数:31,代码来源:TableVerifier.java
示例3: loadLogs
import org.eclipse.collections.impl.map.mutable.UnifiedMap; //导入依赖的package包/类
private void loadLogs() {
logsInput = new UnifiedMap<>();
String logName;
try {
/* checking if the user wants to upload also external logs */
if( extLocation != null ) {
System.out.println("DEBUG - importing external logs.");
File folder = new File(extLocation);
File[] listOfFiles = folder.listFiles();
if( folder.isDirectory() ) {
for( File file : listOfFiles )
if( file.isFile() ) {
logName = file.getPath();
System.out.println("DEBUG - name: " + logName);
logsInput.put(file.getName(), logName);
}
} else {
System.out.println("ERROR - external logs loading failed, input path is not a folder.");
}
}
} catch( Exception e ) {
System.out.println("ERROR - something went wrong reading the resource folder: " + e.getMessage());
e.printStackTrace();
}
}
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:26,代码来源:Experiment.java
示例4: getSelection
import org.eclipse.collections.impl.map.mutable.UnifiedMap; //导入依赖的package包/类
/**
* Accumlate the selection and return a mapping from each primary key to the
* set of event names which have this primary key.
*
* @return
*/
public Map<Set<String>, Set<String>> getSelection() {
Map<Set<String>, Set<String>> group = new UnifiedMap<Set<String>, Set<String>>();
for (int dataIndex = 0; dataIndex < data.size(); dataIndex++) {
Set<String> primaryKey = data.get(dataIndex).primaryKeys[chosenKeysIndex[dataIndex]];
Set<String> set;
if ((set = group.get(primaryKey)) == null) {
set = new UnifiedSet<String>();
group.put(primaryKey, set);
}
set.add(data.get(dataIndex).name);
}
return group;
}
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:22,代码来源:DiscoverERmodel_UI_primaryKeys.java
示例5: constructETCMap
import org.eclipse.collections.impl.map.mutable.UnifiedMap; //导入依赖的package包/类
private static Map<XEventClass, Integer> constructETCMap(Petrinet petrinet, XLog log, XEventClass dummyEvClass) {
Map<XEventClass,Integer> costMOT = new UnifiedMap<XEventClass,Integer>();
XLogInfo summary = XLogInfoFactory.createLogInfo(log, xEventClassifier);
for (XEventClass evClass : summary.getEventClasses().getClasses()) {
int value = 1;
for(Transition t : petrinet.getTransitions()) {
if(t.getLabel().equals(evClass.getId())) {
value = 1;
break;
}
}
costMOT.put(evClass, value);
}
costMOT.put(dummyEvClass, 1);
return costMOT;
}
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:20,代码来源:ComputeMeasurment.java
示例6: constructETCMap
import org.eclipse.collections.impl.map.mutable.UnifiedMap; //导入依赖的package包/类
private static Map<XEventClass, Integer> constructETCMap(Petrinet petrinet, XEventClassifier xEventClassifier, XLog log, XEventClass dummyEvClass) {
Map<XEventClass,Integer> costMOT = new UnifiedMap<XEventClass,Integer>();
XLogInfo summary = XLogInfoFactory.createLogInfo(log, xEventClassifier);
for (XEventClass evClass : summary.getEventClasses().getClasses()) {
int value = 1;
for(Transition t : petrinet.getTransitions()) {
if(t.getLabel().equals(evClass.getId())) {
value = 1;
break;
}
}
costMOT.put(evClass, value);
}
costMOT.put(dummyEvClass, 1);
return costMOT;
}
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:20,代码来源:AlignmentBasedFitness.java
示例7: doesProcessInstanceAlwaysEnd
import org.eclipse.collections.impl.map.mutable.UnifiedMap; //导入依赖的package包/类
private boolean doesProcessInstanceAlwaysEnd(Entity grandParent, Set<String> eventNames, UnifiedMap<Entity, XLog> logs) {
XLog log = logs.get(grandParent);
boolean correct = false;
for (XTrace trace : log) {
boolean occurs = false;
for (XEvent event : trace) {
if (eventNames.contains(xce.extractName(event))) {
occurs = true;
correct = true;
break;
}
}
if (occurs && !eventNames.contains(xce.extractName(trace.get(trace.size() - 1)))) {
correct = false;
break;
}
}
return correct;
}
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:21,代码来源:SubProcessTypeDiscoverer.java
示例8: generateData
import org.eclipse.collections.impl.map.mutable.UnifiedMap; //导入依赖的package包/类
public UnifiedMap<String, Data> generateData(XLog log, List<String> ignoreAttributes) {
UnifiedMap<String, Data> data = transferData(log, ignoreAttributes);
//find functional dependencies and keys
Data currentData;
TANEjava tane;
for (Data data1 : data.values()) {
currentData = data1;
try {
tane = new TANEjava(currentData);
tane.setConsoleOutput(false);
tane.getFD();
tane.getKeys();
} catch (Exception e) {
e.printStackTrace();
}
}
/*
* Step 1: discover primary keys
*/
return data;
}
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:25,代码来源:DiscoverERmodel.java
示例9: removeDuplicateArcs
import org.eclipse.collections.impl.map.mutable.UnifiedMap; //导入依赖的package包/类
public static void removeDuplicateArcs(BPMNDiagram bpmn) {
Map<BPMNNode, Map<BPMNNode, Integer>> map = new UnifiedMap<>();
Iterator<Flow> it = bpmn.getFlows().iterator();
Map<BPMNNode, Integer> innerMap;
while (it.hasNext()) {
Flow f = it.next();
if ((innerMap = map.get(f.getSource())) == null) {
innerMap = new UnifiedMap<>();
map.put(f.getSource(), innerMap);
}
Integer count = innerMap.get(f.getTarget());
if (count == null) {
count = 0;
}
count++;
if (count == 2) {
bpmn.removeEdge(f);
it = bpmn.getFlows().iterator();
map.clear();
}else {
innerMap.put(f.getTarget(), count);
}
}
}
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:27,代码来源:BPMNSimplifier.java
示例10: getInstances
import org.eclipse.collections.impl.map.mutable.UnifiedMap; //导入依赖的package包/类
public Set<EntityInstance> getInstances(UnifiedMap<String, XAttribute> attrValues) {
Set<EntityInstance> foundInstances;
// if((foundInstances = cache.get(attrValues)) == null) {
foundInstances = new UnifiedSet<EntityInstance>();
for (EntityInstance inst : instances) {
Boolean match = true;
for (Map.Entry<String, XAttribute> entry : attrValues.entrySet()) {
if (inst.getValue(entry.getKey()) == null || !inst.getValue(entry.getKey()).equals(entry.getValue())) {
match = false;
break;
}
}
if (match) {
foundInstances.add(inst);
}
}
// cache.put(attrValues, foundInstances);
// }
return foundInstances;
}
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:21,代码来源:EntityInstances.java
示例11: updateEnrichedLikelihood
import org.eclipse.collections.impl.map.mutable.UnifiedMap; //导入依赖的package包/类
public void updateEnrichedLikelihood(XEvent event1, XEvent event2) {
String eventName1 = getEventName(event1);
String eventName2 = getEventName(event2);
Map<String, Integer> map;
if ((map = enrichedDistribution.get(eventName1)) == null) {
map = new UnifiedMap<>();
}
Integer i;
if ((i = map.get(eventName2)) == null) {
i = 0;
}
i++;
map.put(eventName2, i);
enrichedDistribution.put(eventName1, map);
if ((map = enrichedDistributionReverse.get(eventName2)) == null) {
map = new UnifiedMap<>();
}
if ((i = map.get(eventName1)) == null) {
i = 0;
}
i++;
map.put(eventName1, i);
enrichedDistributionReverse.put(eventName2, map);
}
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:27,代码来源:EventDistributionCalculatorImpl.java
示例12: selectOulierToRemove
import org.eclipse.collections.impl.map.mutable.UnifiedMap; //导入依赖的package包/类
@Override
public void selectOulierToRemove(XLog log, int lookAHead, boolean selectOnlyOneOutlier, boolean smallestOrLargest) {
if(selectOnlyOneOutlier) {
boolean outlearsFound = false;
if(mapOutliers.size() > 0) {
outlearsFound = true;
}
if (outlearsFound) {
Map<Outlier<String>, Integer> removed = new UnifiedMap<Outlier<String>, Integer>();
for (XTrace t : log) {
if(t.size() > 0) {
for (int i = lookAHead; i < t.size(); i++) {
checkIfOutlier(removed, t, i, lookAHead, true);
}
}
}
select(removed, smallestOrLargest);
}
}
}
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:22,代码来源:OutlierRemoverNextAndPrevious.java
示例13: selectOulierToRemoveReverse
import org.eclipse.collections.impl.map.mutable.UnifiedMap; //导入依赖的package包/类
@Override
public void selectOulierToRemoveReverse(XLog log, int lookAHead, boolean selectOnlyOneOutlier, boolean smallestOrLargest) {
if(selectOnlyOneOutlier) {
boolean outlearsFound = false;
if(mapOutliers.size() > 0) {
outlearsFound = true;
}
if (outlearsFound) {
Map<Outlier<String>, Integer> removed = new UnifiedMap<Outlier<String>, Integer>();
for (XTrace t : log) {
if(t.size() > 0) {
for (int i = t.size() - lookAHead - 1; i >= 0; i--) {
checkIfOutlier(removed, t, i, lookAHead, false);
}
}
}
select(removed, smallestOrLargest);
}
}
}
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:22,代码来源:OutlierRemoverNextAndPrevious.java
示例14: parseProcessInstance
import org.eclipse.collections.impl.map.mutable.UnifiedMap; //导入依赖的package包/类
private ProcessInstance parseProcessInstance() throws XmlPullParserException, IOException {
String var1 = this.parser.getAttributeValue(null, "id");
String var2 = this.parser.getAttributeValue(null, "description");
Map var3 = new UnifiedMap();
ArrayList var4;
for(var4 = new ArrayList(); !this.atEndTag("ProcessInstance"); this.parser.next()) {
if(this.atStartTag("Data")) {
this.parseData(var3);
} else if(this.atStartTag("AuditTrailEntry")) {
this.insertSorted(var4, this.parseAuditTrailEntry());
}
}
return new ProcessInstanceClassic(this.curProcessName, var1, var2, var3, var4);
}
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:17,代码来源:LogReaderClassic.java
示例15: showGUI
import org.eclipse.collections.impl.map.mutable.UnifiedMap; //导入依赖的package包/类
public ConceptualModel showGUI(XLog log, int algorithm) throws NoEntityException {
List<String> allAttributes = discoverERmodel.generateAllAttributes(log);
DiscoverERmodel_UI_ignoreAttributes ignoreGui = new DiscoverERmodel_UI_ignoreAttributes(allAttributes);
/*
* Step 1: discover primary keys
*/
UnifiedMap<String, Data> data = discoverERmodel.generateData(log, ignoreGui.getIgnoreAttributes());
List<DiscoverERmodel.PrimaryKeyData> pKeyData = DiscoverERmodel.PrimaryKeyData.getData(data);
DiscoverERmodel_UI_primaryKeys pKeyGui = new DiscoverERmodel_UI_primaryKeys(pKeyData);
// get user selection
Map<Set<String>, Set<String>> group = pKeyGui.getSelection();
discoverERmodel.setPrimaryKeysEntityName(generateEntitiesNames(group));
ConceptualModel concModel = discoverERmodel.createConceptualModel(group, data);
return discoverERmodel.showGUI(concModel, discoverERmodel.getPrimaryKeys_entityName(), algorithm);
}
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:22,代码来源:DiscoverERModel_UI.java
示例16: generateEntitiesNames
import org.eclipse.collections.impl.map.mutable.UnifiedMap; //导入依赖的package包/类
public Map<Set<String>, String> generateEntitiesNames(Map<Set<String>, Set<String>> group) throws NoEntityException {
Map<Set<String>, String> primaryKeys_entityName = new UnifiedMap<>();
Scanner console = new Scanner(System.in);
boolean changeParameters = false;
for (Map.Entry<Set<String>, Set<String>> setSetEntry : group.entrySet()) {
String value = "";
if (changeParameters) {
while (value.isEmpty()) {
System.out.println("Select Name for " + DiscoverERmodel.keyToString(setSetEntry.getKey()) + " (Type enter to maintain the name)");
value = console.nextLine();
if (value.isEmpty()) {
value = DiscoverERmodel.keyToString(setSetEntry.getKey());
}
}
} else {
value = DiscoverERmodel.keyToString(setSetEntry.getKey());
}
primaryKeys_entityName.put(setSetEntry.getKey(), value);
}
return primaryKeys_entityName;
}
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:23,代码来源:DiscoverERModel_UI.java
示例17: testSingleSection
import org.eclipse.collections.impl.map.mutable.UnifiedMap; //导入依赖的package包/类
@Test
public void testSingleSection() {
TextMarkupDocument doc = textMarkupDocumentReader.parseString(
"line1\n" +
"line2\r\n" +
"line3\n"
, null
);
ImmutableList<TextMarkupDocumentSection> sections = doc.getSections();
assertEquals(1, sections.size());
this.assertSection(sections.get(0), null, "line1\nline2\r\nline3", UnifiedMap.<String, String>newMap());
}
开发者ID:goldmansachs,项目名称:obevo,代码行数:14,代码来源:TextMarkupDocumentReaderTest.java
示例18: testWithExtraContentAtBeginningAndAfterMetadata
import org.eclipse.collections.impl.map.mutable.UnifiedMap; //导入依赖的package包/类
@Test
public void testWithExtraContentAtBeginningAndAfterMetadata() {
TextMarkupDocument doc = textMarkupDocumentReader.parseString(
"blahblahblah\n" +
"//// " + TextMarkupDocumentReader.TAG_METADATA + " k1=v1 k2=v2\r\n" +
"//// " + TextMarkupDocumentReader.TAG_METADATA + " k3=v3\n" +
"metadataExtra\n" + // avoiding this use case
"//// CHANGE n=1 a=2\n" +
"line1\n" +
"line2\r\n" +
"line3\n" +
"//// CHANGE n=2 TOGGLEACTIVE\n" +
"//// CHANGE n=3\n" +
"finalcontent\r\n" +
"// " + TextMarkupDocumentReader.TAG_ROLLBACK_IF_ALREADY_DEPLOYED + " n=3\n" +
"rollback content\r\n" +
"//// CHANGE n=4\n"
, null
);
ImmutableList<TextMarkupDocumentSection> sections = doc.getSections();
assertEquals(8, sections.size());
this.assertSection(sections.get(0), null, "blahblahblah", UnifiedMap.<String, String>newMap());
this.assertSection(sections.get(1), TextMarkupDocumentReader.TAG_METADATA, null,
UnifiedMap.<String, String>newWithKeysValues("k1", "v1", "k2", "v2"));
this.assertSection(sections.get(2), TextMarkupDocumentReader.TAG_METADATA, null,
UnifiedMap.<String, String>newWithKeysValues("k3", "v3"));
this.assertSection(sections.get(3), null, "metadataExtra", UnifiedMap.<String, String>newMap());
this.assertSection(sections.get(4), TextMarkupDocumentReader.TAG_CHANGE, "line1\nline2\r\nline3",
UnifiedMap.<String, String>newWithKeysValues("n", "1", "a", "2"));
this.assertSection(sections.get(5), TextMarkupDocumentReader.TAG_CHANGE, null, UnifiedMap.<String, String>newWithKeysValues("n", "2"),
UnifiedSet.newSetWith("TOGGLEACTIVE"));
this.assertSection(sections.get(6), TextMarkupDocumentReader.TAG_CHANGE, "finalcontent",
UnifiedMap.<String, String>newWithKeysValues("n", "3"));
this.assertSection(sections.get(6).getSubsections().get(0),
TextMarkupDocumentReader.TAG_ROLLBACK_IF_ALREADY_DEPLOYED, "rollback content",
UnifiedMap.<String, String>newWithKeysValues("n", "3"));
this.assertSection(sections.get(7), TextMarkupDocumentReader.TAG_CHANGE, null, UnifiedMap.<String, String>newWithKeysValues("n", "4"));
}
开发者ID:goldmansachs,项目名称:obevo,代码行数:41,代码来源:TextMarkupDocumentReaderTest.java
示例19: match
import org.eclipse.collections.impl.map.mutable.UnifiedMap; //导入依赖的package包/类
@Override
public void match(MutableList<UnmatchedIndexMap> allMissingRows, MutableList<UnmatchedIndexMap> allSurplusRows, MutableList<IndexMap> matchedColumns)
{
List<IndexMap> keyColumnIndices = this.getKeyColumnIndexMaps(matchedColumns);
if (keyColumnIndices.isEmpty())
{
LOGGER.warn("No key columns found!");
return;
}
MutableMap<RowView, MutableList<UnmatchedIndexMap>> missingByKey = UnifiedMap.newMap(allMissingRows.size());
for (UnmatchedIndexMap expected : allMissingRows)
{
ExpectedRowView expectedRowView = new ExpectedRowView(this.expectedData, keyColumnIndices, this.columnComparators, expected.getExpectedIndex());
missingByKey.getIfAbsentPut(expectedRowView, NEW_LIST).add(expected);
}
MutableMap<RowView, MutableList<UnmatchedIndexMap>> surplusByKey = UnifiedMap.newMap(allSurplusRows.size());
for (UnmatchedIndexMap actual : allSurplusRows)
{
ActualRowView actualRowView = new ActualRowView(this.actualData, keyColumnIndices, this.columnComparators, actual.getActualIndex());
surplusByKey.getIfAbsentPut(actualRowView, NEW_LIST).add(actual);
}
for (RowView rowView : missingByKey.keysView())
{
MutableList<UnmatchedIndexMap> missing = missingByKey.get(rowView);
MutableList<UnmatchedIndexMap> surplus = surplusByKey.get(rowView);
if (Iterate.notEmpty(missing) && Iterate.notEmpty(surplus))
{
this.keyGroupPartialMatcher.match(missing, surplus, matchedColumns);
}
}
}
开发者ID:goldmansachs,项目名称:tablasco,代码行数:32,代码来源:KeyColumnPartialMatcher.java
示例20: detectUniqueTraces
import org.eclipse.collections.impl.map.mutable.UnifiedMap; //导入依赖的package包/类
private Map<String, List<XTrace>> detectUniqueTraces(XLog log) {
Map<String, List<XTrace>> uniqueTraces = new UnifiedMap<>();
for(XTrace trace : log) {
String s = TraceToString.convertXTraceToString(trace, nameExtractor);
List<XTrace> list;
if ((list = uniqueTraces.get(s)) == null) {
list = new ArrayList<>();
uniqueTraces.put(s, list);
}
list.add(trace);
}
return uniqueTraces;
}
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:14,代码来源:TimeStampNoiseGenerator.java
注:本文中的org.eclipse.collections.impl.map.mutable.UnifiedMap类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论