当前位置: 首页>>代码示例>>Java>>正文


Java NetworkEntity.getClass方法代码示例

本文整理汇总了Java中vnreal.network.NetworkEntity.getClass方法的典型用法代码示例。如果您正苦于以下问题:Java NetworkEntity.getClass方法的具体用法?Java NetworkEntity.getClass怎么用?Java NetworkEntity.getClass使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在vnreal.network.NetworkEntity的用法示例。


在下文中一共展示了NetworkEntity.getClass方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getCopy

import vnreal.network.NetworkEntity; //导入方法依赖的package包/类
@Override
public AbstractResource getCopy(
		NetworkEntity<? extends AbstractConstraint> owner, boolean setOccupied) {

	PhysicalProvidedSecurity clone;
	
	if(owner.getClass().getSimpleName().contains("Node"))
		clone = new PhysicalProvidedSecurity((Node<? extends AbstractConstraint>)owner, this.getName());
	else if(owner.getClass().getSimpleName().contains("Link"))
		clone = new PhysicalProvidedSecurity((Link<? extends AbstractConstraint>)owner, this.getName());
	else
		throw new Error("The class: "+owner.getClass()+" is invalid for "+this.getClass().getSimpleName());
	
	clone.level = level;
	return clone;
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:17,代码来源:PhysicalProvidedSecurity.java

示例2: getCopy

import vnreal.network.NetworkEntity; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public AbstractResource getCopy(
		NetworkEntity<? extends AbstractConstraint> owner, boolean setOccupied) {
	if(owner.getClass().getSimpleName().contains("Node"))
		return new NullResource((Node<? extends AbstractResource>)owner, this.getName());
	else if(owner.getClass().getSimpleName().contains("Link"))
		return new NullResource((Link<? extends AbstractResource>)owner, this.getName());
	throw new Error("The class: "+owner.getClass()+" is invalid for NullResource");
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:11,代码来源:NullResource.java

示例3: getCopy

import vnreal.network.NetworkEntity; //导入方法依赖的package包/类
@Override
public AbstractResource getCopy(
		NetworkEntity<? extends AbstractConstraint> owner, boolean setOccupied) {

	PhysicalDemandedSecurity clone;
	if(owner.getClass().getSimpleName().contains("Node"))
		clone = new PhysicalDemandedSecurity((Node<? extends AbstractConstraint>)owner, this.getName());
	else if(owner.getClass().getSimpleName().contains("Link"))
		clone = new PhysicalDemandedSecurity((Link<? extends AbstractConstraint>)owner, this.getName());
	else
		throw new Error("The class: "+owner.getClass()+" is invalid for "+this.getClass().getSimpleName());
	clone.level = level;
	return clone;
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:15,代码来源:PhysicalDemandedSecurity.java

示例4: getCopy

import vnreal.network.NetworkEntity; //导入方法依赖的package包/类
@Override
public AbstractDemand getCopy(NetworkEntity<? extends AbstractDemand> owner) {
	if(owner.getClass().getSimpleName().contains("Node"))
		return new NullDemand((Node<? extends AbstractDemand>)owner, this.getName());
	else if(owner.getClass().getSimpleName().contains("Link"))
		return new NullDemand((Link<? extends AbstractDemand>)owner, this.getName());
	throw new Error("The class: "+owner.getClass()+" is invalid for NullResource");
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:9,代码来源:NullDemand.java

示例5: getCopy

import vnreal.network.NetworkEntity; //导入方法依赖的package包/类
@Override
public AbstractDemand getCopy(NetworkEntity<? extends AbstractDemand> owner) {
	VirtualProvidedSecurity clone;
	
	if(owner.getClass().getSimpleName().contains("Node"))
		clone = new VirtualProvidedSecurity((Node<? extends AbstractConstraint>)owner, this.getName());
	else if(owner.getClass().getSimpleName().contains("Link"))
		clone = new VirtualProvidedSecurity((Link<? extends AbstractConstraint>)owner, this.getName());
	else
		throw new Error("The class: "+owner.getClass()+" is invalid for "+this.getClass().getSimpleName());
	
	clone.virtualProvidedSecurityLevel = this.virtualProvidedSecurityLevel;
	return clone;
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:15,代码来源:VirtualProvidedSecurity.java

示例6: getCopy

import vnreal.network.NetworkEntity; //导入方法依赖的package包/类
@Override
public AbstractDemand getCopy(NetworkEntity<? extends AbstractDemand> owner) {
	VirtualDemandedSecurity clone;
	
	if(owner.getClass().getSimpleName().contains("Node"))
		clone = new VirtualDemandedSecurity((Node<? extends AbstractConstraint>)owner, this.getName());
	else if(owner.getClass().getSimpleName().contains("Link"))
		clone = new VirtualDemandedSecurity((Link<? extends AbstractConstraint>)owner, this.getName());
	else
		throw new Error("The class: "+owner.getClass()+" is invalid for "+this.getClass().getSimpleName());
	
	clone.virtualDemandedSecurityLevel = this.virtualDemandedSecurityLevel;
	return clone;
}
 
开发者ID:KeepTheBeats,项目名称:alevin-svn2,代码行数:15,代码来源:VirtualDemandedSecurity.java


注:本文中的vnreal.network.NetworkEntity.getClass方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。