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

java.lang.Object
  extended by org.gicentre.utils.network.traer.physics.AbstractForce
      extended by org.gicentre.utils.network.traer.physics.UniversalForce
All Implemented Interfaces:
Force

public abstract class UniversalForce
extends AbstractForce

A Force that is applied to Particles at the user's discretion, and hence does not support the Force.apply() method. Users wishing to create custom Forces of this kind should extend this class, implementing the Force.apply(Particle) method only.

Examples of this kind of Force are the Gravity and Drag classes.

Author:
Carl Pearson and minor modifications by Jo Wood.

Constructor Summary
UniversalForce()
           
 
Method Summary
 AbstractForce apply()
          This type of Force must have a target Particle; 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

UniversalForce

public UniversalForce()
Method Detail

apply

public AbstractForce apply()
                    throws java.lang.UnsupportedOperationException
This type of Force must have a target Particle; an exception will be thrown by this method.

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