Codota Logo
RecyclingArrayList.positiveIndexCheck
Code IndexAdd Codota to your IDE (free)

How to use
positiveIndexCheck
method
in
us.ihmc.robotics.lists.RecyclingArrayList

Best Java code snippets using us.ihmc.robotics.lists.RecyclingArrayList.positiveIndexCheck (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
origin: us.ihmc/IHMCRoboticsToolkit

/**
* Checks if the given index is in range.  If not, throws an appropriate
* runtime exception.  This method does *not* check if the index is
* negative: It is always used immediately prior to an array access,
* which throws an ArrayIndexOutOfBoundsException if index is negative.
*/
protected void rangeCheck(int index)
{
 if (index >= size)
   throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + size);
 positiveIndexCheck(index);
}
origin: us.ihmc/IHMCRoboticsToolkit

protected void rangeCheckForInsert(int index)
{
 if (index > size)
   throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + size);
 positiveIndexCheck(index);
}
origin: us.ihmc/IHMCRoboticsToolkit

/**
* Returns the element at the specified position in this list.
* The list will grow if the given index is greater or equal to
* the size this list.
*
* @param  index index of the element to return
* @return the element at the specified position in this list
* @throws IndexOutOfBoundsException if the index is negative (<tt>index &lt; 0</tt>)
*/
public T getAndGrowIfNeeded(int index)
{
 positiveIndexCheck(index);
 if (index >= size)
 {
   size = index + 1;
   ensureCapacity(size);
 }
 return elementData[index];
}
us.ihmc.robotics.listsRecyclingArrayListpositiveIndexCheck

Popular methods of RecyclingArrayList

  • get
    Returns the element at the specified position in this list.
  • add
    Unsupported operation.
  • clear
    Sets the size of the list to 0, but does not change its capacity. This method is meant to recycle a
  • size
    Returns the number of elements in this list.
  • <init>
  • isEmpty
    Returns true if this list contains no elements.
  • getAndGrowIfNeeded
    Returns the element at the specified position in this list. The list will grow if the given index is
  • getLast
    Returns the last element of this list. If the list is empty, it returns null.
  • remove
    Removes the first occurrence of the specified element from this list, if it is present. If the list
  • checkWithMaxCapacity
  • ensureCapacity
  • fillElementDataIfNeeded
  • ensureCapacity,
  • fillElementDataIfNeeded,
  • indexOf,
  • rangeCheck,
  • rangeCheckForInsert,
  • toArray,
  • unsafeFastSwap,
  • unsafeGet,
  • unsafeGrowByN

Popular in Java

  • Making http requests using okhttp
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getApplicationContext (Context)
  • onCreateOptionsMenu (Activity)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • KeyStore (java.security)
    This class represents an in-memory collection of keys and certificates. It manages two types of entr
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Dictionary (java.util)
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to valu
  • TreeMap (java.util)
    A Red-Black tree based NavigableMap implementation. The map is sorted according to the Comparable of
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now