|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gicentre.utils.network.traer.physics.AbstractForce
public abstract class AbstractForce
A skeletal implementation of Force covering the methods concerned with the on/off
state. For the typical user wishing to make a custom Force, it is best to extend this
class (or one of the other skeletal implementations that meet the custom needs more
specifically: TargetedForce, UniversalForce, or TwoBodyForce) and
deal only with defining the Force.apply() and Force.apply(Particle) methods.
| Constructor Summary | |
|---|---|
protected |
AbstractForce()
Creates a default abstract force set to on. |
protected |
AbstractForce(boolean isOn)
Creates an abstract force with the given state. |
| Method Summary | |
|---|---|
boolean |
isOff()
Reports whether or not the force is off. |
boolean |
isOn()
Reports whether or not the force is on. |
AbstractForce |
turnOff()
Turns the force off. |
AbstractForce |
turnOn()
Turns the force on. |
AbstractForce |
turnOn(boolean isOn)
Sets the force to the given state. |
| 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, apply |
| Constructor Detail |
|---|
protected AbstractForce()
on.
protected AbstractForce(boolean isOn)
isOn - The initial state of the force.| Method Detail |
|---|
public AbstractForce turnOff()
turnOff in interface Forcepublic AbstractForce turnOn()
turnOn in interface Forcepublic AbstractForce turnOn(boolean isOn)
turnOn in interface ForceisOn - Determins if this force is on or off.
public boolean isOn()
isOn in interface Forcepublic boolean isOff()
isOff in interface Force
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||