• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java Tuple类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.eclipse.incquery.runtime.matchers.tuple.Tuple的典型用法代码示例。如果您正苦于以下问题:Java Tuple类的具体用法?Java Tuple怎么用?Java Tuple使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Tuple类属于org.eclipse.incquery.runtime.matchers.tuple包,在下文中一共展示了Tuple类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: assertTuple

import org.eclipse.incquery.runtime.matchers.tuple.Tuple; //导入依赖的package包/类
@Override
public Tuple assertTuple(Tuple seed) {
	final URI relativeURI = (URI) seed.get(1);
	if (relativeURI == null) 
		throw new IllegalArgumentException(seed.toString());
	URI resourceURI = model.getUriRelativiser().relativePathToURI(relativeURI);
	
	Resource resource = (Resource) seed.get(0);
	if (resource != null) // rolling back model fact deletion
		try {
			resource.load(null);
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
	else // loading new resource 
		resource = EMFUtil.getOrCreateResource(root, resourceURI);
	
	return new FlatTuple(resource, relativeURI);
}
 
开发者ID:FTSRG,项目名称:mondo-collab-framework,代码行数:20,代码来源:ResourceManipulator.java


示例2: retractTuple

import org.eclipse.incquery.runtime.matchers.tuple.Tuple; //导入依赖的package包/类
@Override
public Tuple retractTuple(Tuple tuple) {
	final EObject element = (EObject) tuple.get(0);
	final EReference feature = (EReference) tuple.get(1);
	final EObject value = (EObject) tuple.get(2);
	if (element == null || feature == null || value == null) 
		throw new UnsupportedOperationException(tuple.toString());
	
	if (feature.isContainment()) {
		unroot(tuple, value, feature, element);
	} else if (feature.isContainer()) {
		unroot(tuple, element, feature.getEOpposite(), value);
	} else {
		EObjectAttributeManipulator.retractFeatureSetting(element, feature, value);
	}
	return tuple;
	
}
 
开发者ID:FTSRG,项目名称:mondo-collab-framework,代码行数:19,代码来源:EObjectReferenceManipulator.java


示例3: assertTuple

import org.eclipse.incquery.runtime.matchers.tuple.Tuple; //导入依赖的package包/类
@Override
public Tuple assertTuple(Tuple seed) {
	final EObject element = (EObject) seed.get(0);
	final EReference feature = (EReference) seed.get(1);
	final EObject value = (EObject) seed.get(2);
	if (element == null || feature == null || value == null) 
		throw new UnsupportedOperationException(seed.toString());
	
	if (feature.isContainment()) {
		move(seed, element, feature, value);
	} else if (feature.isContainer()) {
		move(seed, value, feature.getEOpposite(), element);
	} else {
		EObjectAttributeManipulator.assertFeatureSetting(element, feature, value);
	}
	return seed;
}
 
开发者ID:FTSRG,项目名称:mondo-collab-framework,代码行数:18,代码来源:EObjectReferenceManipulator.java


示例4: doTest

import org.eclipse.incquery.runtime.matchers.tuple.Tuple; //导入依赖的package包/类
@Override
protected void doTest(MondoLensScope scope, IFile policyFile, IFile goldFile, IFile frontFile,
		Resource policyResource, Resource goldResource, Resource frontResource) {
	MondoLensRuntimeContext runtimeContext = MondoLensRuntimeContext.create(null, scope);
	
	for (IInputKey key : runtimeContext.getInputKeys()) {
		System.out.println();
		System.out.println("-----------------");
		System.out.println("Tuples of key: " + key.getPrettyPrintableName());
		
		final FlatTuple nullSeed = new FlatTuple(new Object[key.getArity()]);
		for (Tuple tuple : runtimeContext.enumerateTuples(key, nullSeed)) {
			System.out.println("\t" + tuple);
		}
	}
}
 
开发者ID:FTSRG,项目名称:mondo-collab-framework,代码行数:17,代码来源:LensContextTestHandler.java


示例5: tupleToMatch

import org.eclipse.incquery.runtime.matchers.tuple.Tuple; //导入依赖的package包/类
@Override
protected DefinedByMatch tupleToMatch(final Tuple t) {
  try {
  	return DefinedByMatch.newMatch((hu.bme.mit.trainbenchmark.ttc.railway.Route) t.get(POSITION_ROUTE), (hu.bme.mit.trainbenchmark.ttc.railway.Sensor) t.get(POSITION_SENSOR));
  } catch(ClassCastException e) {
  	LOGGER.error("Element(s) in tuple not properly typed!",e);
  	return null;
  }
}
 
开发者ID:FTSRG,项目名称:trainbenchmark-ttc,代码行数:10,代码来源:DefinedByMatcher.java


示例6: tupleToMatch

import org.eclipse.incquery.runtime.matchers.tuple.Tuple; //导入依赖的package包/类
@Override
protected EntrySemaphoreMatch tupleToMatch(final Tuple t) {
  try {
  	return EntrySemaphoreMatch.newMatch((hu.bme.mit.trainbenchmark.ttc.railway.Route) t.get(POSITION_ROUTE), (hu.bme.mit.trainbenchmark.ttc.railway.Semaphore) t.get(POSITION_SEMAPHORE));
  } catch(ClassCastException e) {
  	LOGGER.error("Element(s) in tuple not properly typed!",e);
  	return null;
  }
}
 
开发者ID:FTSRG,项目名称:trainbenchmark-ttc,代码行数:10,代码来源:EntrySemaphoreMatcher.java


示例7: tupleToMatch

import org.eclipse.incquery.runtime.matchers.tuple.Tuple; //导入依赖的package包/类
@Override
protected HasSensorMatch tupleToMatch(final Tuple t) {
  try {
  	return HasSensorMatch.newMatch((hu.bme.mit.trainbenchmark.ttc.railway.TrackElement) t.get(POSITION_SW));
  } catch(ClassCastException e) {
  	LOGGER.error("Element(s) in tuple not properly typed!",e);
  	return null;
  }
}
 
开发者ID:FTSRG,项目名称:trainbenchmark-ttc,代码行数:10,代码来源:HasSensorMatcher.java


示例8: tupleToMatch

import org.eclipse.incquery.runtime.matchers.tuple.Tuple; //导入依赖的package包/类
@Override
protected RouteSensorMatch tupleToMatch(final Tuple t) {
  try {
  	return RouteSensorMatch.newMatch((hu.bme.mit.trainbenchmark.ttc.railway.Route) t.get(POSITION_ROUTE), (hu.bme.mit.trainbenchmark.ttc.railway.Sensor) t.get(POSITION_SENSOR), (hu.bme.mit.trainbenchmark.ttc.railway.SwitchPosition) t.get(POSITION_SWITCHPOSITION), (hu.bme.mit.trainbenchmark.ttc.railway.Switch) t.get(POSITION_SW));
  } catch(ClassCastException e) {
  	LOGGER.error("Element(s) in tuple not properly typed!",e);
  	return null;
  }
}
 
开发者ID:FTSRG,项目名称:trainbenchmark-ttc,代码行数:10,代码来源:RouteSensorMatcher.java


示例9: tupleToMatch

import org.eclipse.incquery.runtime.matchers.tuple.Tuple; //导入依赖的package包/类
@Override
protected SemaphoreNeighborMatch tupleToMatch(final Tuple t) {
  try {
  	return SemaphoreNeighborMatch.newMatch((hu.bme.mit.trainbenchmark.ttc.railway.Semaphore) t.get(POSITION_SEMAPHORE), (hu.bme.mit.trainbenchmark.ttc.railway.Route) t.get(POSITION_ROUTE1), (hu.bme.mit.trainbenchmark.ttc.railway.Route) t.get(POSITION_ROUTE2), (hu.bme.mit.trainbenchmark.ttc.railway.Sensor) t.get(POSITION_SENSOR1), (hu.bme.mit.trainbenchmark.ttc.railway.Sensor) t.get(POSITION_SENSOR2), (hu.bme.mit.trainbenchmark.ttc.railway.TrackElement) t.get(POSITION_TE1), (hu.bme.mit.trainbenchmark.ttc.railway.TrackElement) t.get(POSITION_TE2));
  } catch(ClassCastException e) {
  	LOGGER.error("Element(s) in tuple not properly typed!",e);
  	return null;
  }
}
 
开发者ID:FTSRG,项目名称:trainbenchmark-ttc,代码行数:10,代码来源:SemaphoreNeighborMatcher.java


示例10: tupleToMatch

import org.eclipse.incquery.runtime.matchers.tuple.Tuple; //导入依赖的package包/类
@Override
protected SwitchSetMatch tupleToMatch(final Tuple t) {
  try {
  	return SwitchSetMatch.newMatch((hu.bme.mit.trainbenchmark.ttc.railway.Semaphore) t.get(POSITION_SEMAPHORE), (hu.bme.mit.trainbenchmark.ttc.railway.Route) t.get(POSITION_ROUTE), (hu.bme.mit.trainbenchmark.ttc.railway.SwitchPosition) t.get(POSITION_SWP), (hu.bme.mit.trainbenchmark.ttc.railway.Switch) t.get(POSITION_SW));
  } catch(ClassCastException e) {
  	LOGGER.error("Element(s) in tuple not properly typed!",e);
  	return null;
  }
}
 
开发者ID:FTSRG,项目名称:trainbenchmark-ttc,代码行数:10,代码来源:SwitchSetMatcher.java


示例11: tupleToMatch

import org.eclipse.incquery.runtime.matchers.tuple.Tuple; //导入依赖的package包/类
@Override
protected SwitchSensorMatch tupleToMatch(final Tuple t) {
  try {
  	return SwitchSensorMatch.newMatch((hu.bme.mit.trainbenchmark.ttc.railway.Switch) t.get(POSITION_SW));
  } catch(ClassCastException e) {
  	LOGGER.error("Element(s) in tuple not properly typed!",e);
  	return null;
  }
}
 
开发者ID:FTSRG,项目名称:trainbenchmark-ttc,代码行数:10,代码来源:SwitchSensorMatcher.java


示例12: tupleToMatch

import org.eclipse.incquery.runtime.matchers.tuple.Tuple; //导入依赖的package包/类
@Override
protected PosLengthMatch tupleToMatch(final Tuple t) {
  try {
  	return PosLengthMatch.newMatch((hu.bme.mit.trainbenchmark.ttc.railway.Segment) t.get(POSITION_SEGMENT));
  } catch(ClassCastException e) {
  	LOGGER.error("Element(s) in tuple not properly typed!",e);
  	return null;
  }
}
 
开发者ID:FTSRG,项目名称:trainbenchmark-ttc,代码行数:10,代码来源:PosLengthMatcher.java


示例13: tupleToMatch

import org.eclipse.incquery.runtime.matchers.tuple.Tuple; //导入依赖的package包/类
@Override
protected Id2objectMatch tupleToMatch(final Tuple t) {
  try {
  	return Id2objectMatch.newMatch((es.ikerlan.WTSpec4M.WTElement) t.get(POSITION_EOBJECT), (java.lang.String) t.get(POSITION_ID));
  } catch(ClassCastException e) {
  	LOGGER.error("Element(s) in tuple not properly typed!",e);
  	return null;
  }
}
 
开发者ID:mondo-project,项目名称:mondo-demo-wt,代码行数:10,代码来源:Id2objectMatcher.java


示例14: tupleToMatch

import org.eclipse.incquery.runtime.matchers.tuple.Tuple; //导入依赖的package包/类
@Override
protected ChildClassesWithDifferentParentsMatch tupleToMatch(final Tuple t) {
  try {
  	return ChildClassesWithDifferentParentsMatch.newMatch((TypeGraphTrace.ClassListTrace) t.get(POSITION_CLASSLISTTRACE), (TypeGraphBasic.TClass) t.get(POSITION_CLASSONE), (TypeGraphBasic.TClass) t.get(POSITION_CLASSTWO));
  } catch(ClassCastException e) {
  	LOGGER.error("Element(s) in tuple not properly typed!",e);
  	return null;
  }
}
 
开发者ID:viatra,项目名称:java-refactoring-ttc-viatra,代码行数:10,代码来源:ChildClassesWithDifferentParentsMatcher.java


示例15: tupleToMatch

import org.eclipse.incquery.runtime.matchers.tuple.Tuple; //导入依赖的package包/类
@Override
protected MethodDefinitionInClassListMatch tupleToMatch(final Tuple t) {
  try {
  	return MethodDefinitionInClassListMatch.newMatch((TypeGraphBasic.TClass) t.get(POSITION_PARENTCLASS), (TypeGraphBasic.TMethodSignature) t.get(POSITION_METHODSIGNATURE), (TypeGraphBasic.TClass) t.get(POSITION_CLAZZ), (TypeGraphBasic.TMethodDefinition) t.get(POSITION_METHODDEFINITION));
  } catch(ClassCastException e) {
  	LOGGER.error("Element(s) in tuple not properly typed!",e);
  	return null;
  }
}
 
开发者ID:viatra,项目名称:java-refactoring-ttc-viatra,代码行数:10,代码来源:MethodDefinitionInClassListMatcher.java


示例16: tupleToMatch

import org.eclipse.incquery.runtime.matchers.tuple.Tuple; //导入依赖的package包/类
@Override
protected MethodsAccessingSiblingMembersMatch tupleToMatch(final Tuple t) {
  try {
  	return MethodsAccessingSiblingMembersMatch.newMatch((TypeGraphBasic.TMethodDefinition) t.get(POSITION_METHODDEFINITION));
  } catch(ClassCastException e) {
  	LOGGER.error("Element(s) in tuple not properly typed!",e);
  	return null;
  }
}
 
开发者ID:viatra,项目名称:java-refactoring-ttc-viatra,代码行数:10,代码来源:MethodsAccessingSiblingMembersMatcher.java


示例17: tupleToMatch

import org.eclipse.incquery.runtime.matchers.tuple.Tuple; //导入依赖的package包/类
@Override
protected MethodWithSignatureMatch tupleToMatch(final Tuple t) {
  try {
  	return MethodWithSignatureMatch.newMatch((TypeGraphTrace.MethodSignatureTrace) t.get(POSITION_TRACE), (java.lang.String) t.get(POSITION_SIGNATURE));
  } catch(ClassCastException e) {
  	LOGGER.error("Element(s) in tuple not properly typed!",e);
  	return null;
  }
}
 
开发者ID:viatra,项目名称:java-refactoring-ttc-viatra,代码行数:10,代码来源:MethodWithSignatureMatcher.java


示例18: tupleToMatch

import org.eclipse.incquery.runtime.matchers.tuple.Tuple; //导入依赖的package包/类
@Override
protected ClassesOfClassListTraceMatch tupleToMatch(final Tuple t) {
  try {
  	return ClassesOfClassListTraceMatch.newMatch((java.lang.String) t.get(POSITION_CONCATSIGNATURE), (TypeGraphBasic.TClass) t.get(POSITION_TCLASS));
  } catch(ClassCastException e) {
  	LOGGER.error("Element(s) in tuple not properly typed!",e);
  	return null;
  }
}
 
开发者ID:viatra,项目名称:java-refactoring-ttc-viatra,代码行数:10,代码来源:ClassesOfClassListTraceMatcher.java


示例19: tupleToMatch

import org.eclipse.incquery.runtime.matchers.tuple.Tuple; //导入依赖的package包/类
@Override
protected PossibleCSCMatch tupleToMatch(final Tuple t) {
  try {
  	return PossibleCSCMatch.newMatch((java.lang.String) t.get(POSITION_CONCATSIGNATURE), (TypeGraphBasic.TMethodSignature) t.get(POSITION_METHODSIGNATURE));
  } catch(ClassCastException e) {
  	LOGGER.error("Element(s) in tuple not properly typed!",e);
  	return null;
  }
}
 
开发者ID:viatra,项目名称:java-refactoring-ttc-viatra,代码行数:10,代码来源:PossibleCSCMatcher.java


示例20: tupleToMatch

import org.eclipse.incquery.runtime.matchers.tuple.Tuple; //导入依赖的package包/类
@Override
protected PackageWithNameMatch tupleToMatch(final Tuple t) {
  try {
  	return PackageWithNameMatch.newMatch((TypeGraphBasic.TPackage) t.get(POSITION_TPACKAGE), (java.lang.String) t.get(POSITION_PACKAGENAME));
  } catch(ClassCastException e) {
  	LOGGER.error("Element(s) in tuple not properly typed!",e);
  	return null;
  }
}
 
开发者ID:viatra,项目名称:java-refactoring-ttc-viatra,代码行数:10,代码来源:PackageWithNameMatcher.java



注:本文中的org.eclipse.incquery.runtime.matchers.tuple.Tuple类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Processors类代码示例发布时间:2022-05-22
下一篇:
Java ConstantMeta类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap