prefuse.util.force
Class Spring.SpringFactory

java.lang.Object
  extended by prefuse.util.force.Spring.SpringFactory
Enclosing class:
Spring

public static final class Spring.SpringFactory
extends java.lang.Object

The SpringFactory is responsible for generating Spring instances and maintaining an object pool of Springs to reduce garbage collection overheads while force simulations are running.


Constructor Summary
Spring.SpringFactory()
           
 
Method Summary
 Spring getSpring(ForceItem f1, ForceItem f2, float k, float length)
          Get a Spring instance and set it to the given parameters.
 void reclaim(Spring s)
          Reclaim a Spring into the object pool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Spring.SpringFactory

public Spring.SpringFactory()
Method Detail

getSpring

public Spring getSpring(ForceItem f1,
                        ForceItem f2,
                        float k,
                        float length)
Get a Spring instance and set it to the given parameters.


reclaim

public void reclaim(Spring s)
Reclaim a Spring into the object pool.



Copyright © 2007 Regents of the University of California