java.util.ArrayDeque.copyElements()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(7.7k)|赞(0)|评价(0)|浏览(124)

本文整理了Java中java.util.ArrayDeque.copyElements()方法的一些代码示例,展示了ArrayDeque.copyElements()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ArrayDeque.copyElements()方法的具体详情如下:
包路径:java.util.ArrayDeque
类名称:ArrayDeque
方法名:copyElements

ArrayDeque.copyElements介绍

[英]Copies the elements from our element array into the specified array, in order (from first to last element in the deque). It is assumed that the array is large enough to hold all elements in the deque.
[中]按顺序(从deque中的第一个元素到最后一个元素)将元素从元素数组复制到指定的数组中。假设数组足够大,可以容纳deque中的所有元素。

代码示例

代码示例来源:origin: robovm/robovm

/**
 * Returns an array containing all of the elements in this deque
 * in proper sequence (from first to last element).
 *
 * <p>The returned array will be "safe" in that no references to it are
 * maintained by this deque.  (In other words, this method must allocate
 * a new array).  The caller is thus free to modify the returned array.
 *
 * <p>This method acts as bridge between array-based and collection-based
 * APIs.
 *
 * @return an array containing all of the elements in this deque
 */
public Object[] toArray() {
  return copyElements(new Object[size()]);
}

代码示例来源:origin: robovm/robovm

a = (T[])java.lang.reflect.Array.newInstance(
      a.getClass().getComponentType(), size);
copyElements(a);
if (a.length > size)
  a[size] = null;

代码示例来源:origin: MobiVM/robovm

/**
 * Returns an array containing all of the elements in this deque
 * in proper sequence (from first to last element).
 *
 * <p>The returned array will be "safe" in that no references to it are
 * maintained by this deque.  (In other words, this method must allocate
 * a new array).  The caller is thus free to modify the returned array.
 *
 * <p>This method acts as bridge between array-based and collection-based
 * APIs.
 *
 * @return an array containing all of the elements in this deque
 */
public Object[] toArray() {
  return copyElements(new Object[size()]);
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * Returns an array containing all of the elements in this deque
 * in proper sequence (from first to last element).
 *
 * <p>The returned array will be "safe" in that no references to it are
 * maintained by this deque.  (In other words, this method must allocate
 * a new array).  The caller is thus free to modify the returned array.
 *
 * <p>This method acts as bridge between array-based and collection-based
 * APIs.
 *
 * @return an array containing all of the elements in this deque
 */
public Object[] toArray() {
  return copyElements(new Object[size()]);
}

代码示例来源:origin: org.apidesign.bck2brwsr/emul

/**
 * Returns an array containing all of the elements in this deque
 * in proper sequence (from first to last element).
 *
 * <p>The returned array will be "safe" in that no references to it are
 * maintained by this deque.  (In other words, this method must allocate
 * a new array).  The caller is thus free to modify the returned array.
 *
 * <p>This method acts as bridge between array-based and collection-based
 * APIs.
 *
 * @return an array containing all of the elements in this deque
 */
public Object[] toArray() {
  return copyElements(new Object[size()]);
}

代码示例来源:origin: org.codehaus.jsr166-mirror/jsr166

/**
 * Returns an array containing all of the elements in this deque
 * in proper sequence (from first to last element).
 *
 * <p>The returned array will be "safe" in that no references to it are
 * maintained by this deque.  (In other words, this method must allocate
 * a new array).  The caller is thus free to modify the returned array.
 *
 * <p>This method acts as bridge between array-based and collection-based
 * APIs.
 *
 * @return an array containing all of the elements in this deque
 */
public Object[] toArray() {
  return copyElements(new Object[size()]);
}

代码示例来源:origin: ibinti/bugvm

/**
 * Returns an array containing all of the elements in this deque
 * in proper sequence (from first to last element).
 *
 * <p>The returned array will be "safe" in that no references to it are
 * maintained by this deque.  (In other words, this method must allocate
 * a new array).  The caller is thus free to modify the returned array.
 *
 * <p>This method acts as bridge between array-based and collection-based
 * APIs.
 *
 * @return an array containing all of the elements in this deque
 */
public Object[] toArray() {
  return copyElements(new Object[size()]);
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/**
 * Returns an array containing all of the elements in this deque
 * in proper sequence (from first to last element).
 *
 * <p>The returned array will be "safe" in that no references to it are
 * maintained by this deque.  (In other words, this method must allocate
 * a new array).  The caller is thus free to modify the returned array.
 *
 * <p>This method acts as bridge between array-based and collection-based
 * APIs.
 *
 * @return an array containing all of the elements in this deque
 */
public Object[] toArray() {
  return copyElements(new Object[size()]);
}

代码示例来源:origin: com.jtransc/jtransc-rt

/**
 * Returns an array containing all of the elements in this deque
 * in proper sequence (from first to last element).
 *
 * <p>The returned array will be "safe" in that no references to it are
 * maintained by this deque.  (In other words, this method must allocate
 * a new array).  The caller is thus free to modify the returned array.
 *
 * <p>This method acts as bridge between array-based and collection-based
 * APIs.
 *
 * @return an array containing all of the elements in this deque
 */
public Object[] toArray() {
  return copyElements(new Object[size()]);
}

代码示例来源:origin: com.gluonhq/robovm-rt

/**
 * Returns an array containing all of the elements in this deque
 * in proper sequence (from first to last element).
 *
 * <p>The returned array will be "safe" in that no references to it are
 * maintained by this deque.  (In other words, this method must allocate
 * a new array).  The caller is thus free to modify the returned array.
 *
 * <p>This method acts as bridge between array-based and collection-based
 * APIs.
 *
 * @return an array containing all of the elements in this deque
 */
public Object[] toArray() {
  return copyElements(new Object[size()]);
}

代码示例来源:origin: jtulach/bck2brwsr

/**
 * Returns an array containing all of the elements in this deque
 * in proper sequence (from first to last element).
 *
 * <p>The returned array will be "safe" in that no references to it are
 * maintained by this deque.  (In other words, this method must allocate
 * a new array).  The caller is thus free to modify the returned array.
 *
 * <p>This method acts as bridge between array-based and collection-based
 * APIs.
 *
 * @return an array containing all of the elements in this deque
 */
public Object[] toArray() {
  return copyElements(new Object[size()]);
}

代码示例来源:origin: FlexoVM/flexovm

/**
 * Returns an array containing all of the elements in this deque
 * in proper sequence (from first to last element).
 *
 * <p>The returned array will be "safe" in that no references to it are
 * maintained by this deque.  (In other words, this method must allocate
 * a new array).  The caller is thus free to modify the returned array.
 *
 * <p>This method acts as bridge between array-based and collection-based
 * APIs.
 *
 * @return an array containing all of the elements in this deque
 */
public Object[] toArray() {
  return copyElements(new Object[size()]);
}

代码示例来源:origin: ibinti/bugvm

a = (T[])java.lang.reflect.Array.newInstance(
      a.getClass().getComponentType(), size);
copyElements(a);
if (a.length > size)
  a[size] = null;

代码示例来源:origin: org.codehaus.jsr166-mirror/jsr166

a = (T[])java.lang.reflect.Array.newInstance(
      a.getClass().getComponentType(), size);
copyElements(a);
if (a.length > size)
  a[size] = null;

代码示例来源:origin: MobiVM/robovm

a = (T[])java.lang.reflect.Array.newInstance(
      a.getClass().getComponentType(), size);
copyElements(a);
if (a.length > size)
  a[size] = null;

代码示例来源:origin: com.bugvm/bugvm-rt

a = (T[])java.lang.reflect.Array.newInstance(
      a.getClass().getComponentType(), size);
copyElements(a);
if (a.length > size)
  a[size] = null;

代码示例来源:origin: jtulach/bck2brwsr

a = (T[])java.lang.reflect.Array.newInstance(
      a.getClass().getComponentType(), size);
copyElements(a);
if (a.length > size)
  a[size] = null;

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

a = (T[])java.lang.reflect.Array.newInstance(
      a.getClass().getComponentType(), size);
copyElements(a);
if (a.length > size)
  a[size] = null;

代码示例来源:origin: org.apidesign.bck2brwsr/emul

a = (T[])java.lang.reflect.Array.newInstance(
      a.getClass().getComponentType(), size);
copyElements(a);
if (a.length > size)
  a[size] = null;

代码示例来源:origin: com.jtransc/jtransc-rt

a = (T[])java.lang.reflect.Array.newInstance(
      a.getClass().getComponentType(), size);
copyElements(a);
if (a.length > size)
  a[size] = null;

相关文章