本文整理汇总了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;
}
示例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");
}
示例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;
}
示例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");
}
示例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;
}
示例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;
}