congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
RecycleManager.requestInstance
Code IndexAdd Tabnine to your IDE (free)

How to use
requestInstance
method
in
org.ddogleg.struct.RecycleManager

Best Java code snippets using org.ddogleg.struct.RecycleManager.requestInstance (Showing top 4 results out of 315)

origin: org.ddogleg/ddogleg

  @Override
  public T requestInstance() {
    T n = super.requestInstance();
    used.add(n);
    return n;
  }
}
origin: lessthanoptimal/ddogleg

  @Override
  public T requestInstance() {
    T n = super.requestInstance();
    used.add(n);
    return n;
  }
}
origin: org.boofcv/recognition

  /**
   * Creates a new edge which will connect the two nodes.  The side on each node which is connected
   * is specified by the indexes.
   * @param a First node
   * @param indexA side on node 'a'
   * @param b Second node
   * @param indexB side on node 'b'
   * @param distance distance apart the center of the two nodes
   */
  void connect( SquareNode a , int indexA , SquareNode b , int indexB , double distance ) {
    SquareEdge edge = edges.requestInstance();
    edge.reset();

    edge.a = a;
    edge.sideA = indexA;
    edge.b = b;
    edge.sideB = indexB;
    edge.distance = distance;

    a.edges[indexA] = edge;
    b.edges[indexB] = edge;
  }
}
origin: lessthanoptimal/ddogleg

@Test
public void requestInstance_recycleInstance() {
  RecycleManager<Dummy> manager = new RecycleManager<Dummy>(Dummy.class);
  Dummy first = manager.requestInstance();
  Dummy second = manager.requestInstance();
  manager.recycleInstance(first);
  Dummy third = manager.requestInstance();
  assertTrue(first==third);
  assertTrue(first!=second);
  assertEquals(0, manager.unused.size());
}
org.ddogleg.structRecycleManagerrequestInstance

Javadoc

Either returns a recycled instance or a new one.

Popular methods of RecycleManager

  • createInstance
    Creates a new instance using the class. overload this to handle more complex constructors
  • recycleInstance
    Call when an instance is no longer needed and can be recycled
  • <init>

Popular in Java

  • Finding current android device location
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setContentView (Activity)
  • addToBackStack (FragmentTransaction)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now