org.gicentre.utils.network.traer.physics
Class TargetedForce

java.lang.Object
  extended by org.gicentre.utils.network.traer.physics.AbstractForce
      extended by org.gicentre.utils.network.traer.physics.TargetedForce
All Implemented Interfaces:
Force
Direct Known Subclasses:
TwoBodyForce

public abstract class TargetedForce
extends AbstractForce

A Force that has its subject Particles already specified, and hence does not support the Force.apply(Particle) method. Users wishing to create custom Forces of this kind should extend this class, implementing the Force.apply() method only. Examples of this kind of Force are the TwoBodyForces Attraction and Spring forces

Since:
4.0
Author:
Carl Pearson and minor modifications by Jo Wood.

Constructor Summary
TargetedForce()
           
 
Method Summary
 Particle apply(Particle p)
          This type of Force does not support application to any Particle p; an exception will be thrown by this method.
 
Methods inherited from class org.gicentre.utils.network.traer.physics.AbstractForce
isOff, isOn, turnOff, turnOn, turnOn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.gicentre.utils.network.traer.physics.Force
apply
 

Constructor Detail

TargetedForce

public TargetedForce()
Method Detail

apply

public Particle apply(Particle p)
               throws java.lang.UnsupportedOperationException
This type of Force does not support application to any Particle p; an exception will be thrown by this method.

Parameters:
p - irrelevant, this method will always throw an exception
Returns:
irrelevant, this method will always throw an exception
Throws:
java.lang.UnsupportedOperationException - this Force is guaranteed to throw this exception


giCentre Utilities V.3.3, API documentation generated 6th April, 2013