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

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

Best Java code snippets using us.ihmc.robotics.lists.RecyclingArrayList (Showing top 20 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/IHMCHumanoidRobotics

public void setPredictedContactPoints(RecyclingArrayList<Point2d> predictedContactPoints)
{
 this.predictedContactPoints.clear();
 for(int i = 0; i < predictedContactPoints.size(); i++)
   this.predictedContactPoints.add().set(predictedContactPoints.get(i));
}
origin: us.ihmc/IHMCRoboticsToolkit

public FrameTrajectoryPointList(Class<F> frameTrajectoryPointClass)
{
 trajectoryPoints = new RecyclingArrayList<>(frameTrajectoryPointClass);
}
origin: us.ihmc/IHMCRoboticsToolkit

/**
* Returns the last element of this list.
* If the list is empty, it returns {@code null}.
* @return the last element of this list
*/
public T getLast()
{
 if (isEmpty())
   return null;
 else
   return unsafeGet(size - 1);
}
origin: us.ihmc/IHMCRoboticsToolkit

@Override
public void addTimeOffset(double timeOffsetToAdd)
{
 for (int i = 0; i < trajectoryPoints.size(); i++)
   trajectoryPoints.get(i).addTimeOffset(timeOffsetToAdd);
}
origin: us.ihmc/IHMCRoboticsToolkit

@Override
public void addTrajectoryPoint(P trajectoryPoint)
{
 trajectoryPoints.add().set(trajectoryPoint);
}
origin: us.ihmc/CommonWalkingControlModules

@Override
public void setWaypoints(ArrayList<FramePoint> waypointPositions)
{
 if (waypointPositions.size() > maxWaypoints)
   throw new RuntimeException("Too many waypoints");
 this.waypointPositions.clear();
 coefficients.clear();
 coefficients.add();
 for (int i = 0; i < waypointPositions.size(); i++)
 {
   waypointPosition.setIncludingFrame(waypointPositions.get(i));
   waypointPosition.changeFrame(swingFrame);
   TDoubleArrayList waypoint = this.waypointPositions.add();
   waypoint.set(0, this.waypointPosition.getX());
   waypoint.set(1, this.waypointPosition.getZ());
   coefficients.add();
 }
 optimizer.setWaypoints(this.waypointPositions);
 segments.set(waypointPositions.size() + 1);
}
origin: us.ihmc/IHMCRoboticsToolkit

@Override
public void clear()
{
 trajectoryPoints.clear();
}
origin: us.ihmc/IHMCRoboticsToolkit

public boolean constructFromInteriorOfRays(List<Line2d> rays, ConvexPolygon2d polygonToPack)
 removeRay.clear();
   removeRay.getAndGrowIfNeeded(i).setValue(false);
   if (removeRay.get(rayIndex).booleanValue())
    if (removeRay.get(previousIndexToCheck).booleanValue())
      continue;    // That ray was removed already. Check a previous ray.
      removeRay.get(previousIndexToCheck).setValue(true);
      removeIntersectionPoint(intersectionPoints, previousIndexToCheck);
      if (removeRay.get(evenMorePreviousIndexToCheck).booleanValue())
       continue;    // That ray was removed already. Check a previous ray.
      Line2d evenMorePreviousRayToCheck = rays.get(evenMorePreviousIndexToCheck);
       removeRay.get(previousIndexToCheck).setValue(true);
       removeIntersectionPoint(intersectionPoints, previousIndexToCheck);
origin: us.ihmc/IHMCRoboticsToolkit

@Override
public F getTrajectoryPoint(int trajectoryPointIndex)
{
 return trajectoryPoints.get(trajectoryPointIndex);
}
origin: us.ihmc/CommonWalkingControlModules

if (footstepData.getPredictedContactPoints().isEmpty())
  contactPoints = null;
else
  for (int i = 0; i < footstepData.getPredictedContactPoints().size(); i++)
   contactPoints.add(footstepData.getPredictedContactPoints().get(i));
origin: us.ihmc/IHMCRoboticsToolkit

@Override
public int getNumberOfTrajectoryPoints()
{
 return trajectoryPoints.size();
}
origin: us.ihmc/IHMCRoboticsToolkit

/**
* Add a new element at the end of this list.
* @return the new element.
*/
public T add()
{
 return getAndGrowIfNeeded(size);
}
origin: us.ihmc/IHMCHumanoidRobotics

  @Override
  public boolean isCommandValid()
  {
   return timestamp != -1L && !scan.isEmpty();
  }
}
origin: us.ihmc/IHMCRoboticsToolkit

@Override
public P getLastTrajectoryPoint()
{
 return trajectoryPoints.getLast();
}
origin: us.ihmc/IHMCRoboticsToolkit

@Override
public void subtractTimeOffset(double timeOffsetToSubtract)
{
 for (int i = 0; i < trajectoryPoints.size(); i++)
   trajectoryPoints.get(i).subtractTimeOffset(timeOffsetToSubtract);
}
origin: us.ihmc/IHMCRoboticsToolkit

protected F addAndInitializeTrajectoryPoint()
{
 F newTrajectoryPoint = trajectoryPoints.add();
 newTrajectoryPoint.setToZero(referenceFrame);
 return newTrajectoryPoint;
}
origin: us.ihmc/CommonWalkingControlModules

/**
* Resets the optimizer and removes all waypoints as well as previous start and end conditions.
*/
public void reset()
{
 initialPosition.setToNaN(trajectoryFrame);
 initialVelocity.setToNaN(trajectoryFrame);
 finalPosition.setToNaN(trajectoryFrame);
 finalVelocity.setToNaN(trajectoryFrame);
 segments.set(1);
 this.waypointPositions.clear();
 optimizer.setWaypoints(waypointPositions);
 coefficients.clear();
 coefficients.add();
}
origin: us.ihmc/IHMCHumanoidRobotics

public void clear(RobotSide robotSide)
{
 commandId = Packet.VALID_MESSAGE_DEFAULT_ID;
 jointTrajectoryInputs.clear();
 this.robotSide = robotSide;
 executionMode = null;
 previousCommandId = Packet.INVALID_MESSAGE_ID;
}
origin: us.ihmc/IHMCRoboticsToolkit

@Override
public P getTrajectoryPoint(int trajectoryPointIndex)
{
 return trajectoryPoints.get(trajectoryPointIndex);
}
origin: us.ihmc/IHMCRoboticsToolkit

@Override
public int getNumberOfTrajectoryPoints()
{
 return trajectoryPoints.size();
}
us.ihmc.robotics.listsRecyclingArrayList

Most used methods

  • 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,
  • positiveIndexCheck,
  • 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