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

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

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

ArrayDeque.removeFirstOccurrence介绍

[英]Removes the first occurrence of the specified element in this deque (when traversing the deque from head to tail). If the deque does not contain the element, it is unchanged. More formally, removes the first element e such that o.equals(e) (if such an element exists). Returns true if this deque contained the specified element (or equivalently, if this deque changed as a result of the call).
[中]删除此deque中指定元素的第一个匹配项(从头到尾遍历deque时)。如果deque不包含该元素,则该元素将保持不变。更正式地说,删除第一个元素e,使得o等于(e)(如果存在这样的元素)。如果此deque包含指定的元素,则返回true(或者如果此deque因调用而更改,则返回等效值)。

代码示例

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

/**
 * Removes a single instance of the specified element from this deque.
 * If the deque does not contain the element, it is unchanged.
 * More formally, removes the first element <tt>e</tt> such that
 * <tt>o.equals(e)</tt> (if such an element exists).
 * Returns <tt>true</tt> if this deque contained the specified element
 * (or equivalently, if this deque changed as a result of the call).
 *
 * <p>This method is equivalent to {@link #removeFirstOccurrence}.
 *
 * @param o element to be removed from this deque, if present
 * @return <tt>true</tt> if this deque contained the specified element
 */
public boolean remove(Object o) {
  return removeFirstOccurrence(o);
}

代码示例来源:origin: org.zeromq/jeromq

@Override
public boolean removeFirstOccurrence(Object o)
{
  return frames.removeFirstOccurrence(o);
}

代码示例来源:origin: anba/es6draft

void removeLiteral(ObjectLiteral object) {
  boolean removed = objectLiterals.removeFirstOccurrence(object);
  assert removed;
}

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

/**
 * Removes a single instance of the specified element from this deque.
 * If the deque does not contain the element, it is unchanged.
 * More formally, removes the first element <tt>e</tt> such that
 * <tt>o.equals(e)</tt> (if such an element exists).
 * Returns <tt>true</tt> if this deque contained the specified element
 * (or equivalently, if this deque changed as a result of the call).
 *
 * <p>This method is equivalent to {@link #removeFirstOccurrence}.
 *
 * @param o element to be removed from this deque, if present
 * @return <tt>true</tt> if this deque contained the specified element
 */
public boolean remove(Object o) {
  return removeFirstOccurrence(o);
}

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

/**
 * Removes a single instance of the specified element from this deque.
 * If the deque does not contain the element, it is unchanged.
 * More formally, removes the first element <tt>e</tt> such that
 * <tt>o.equals(e)</tt> (if such an element exists).
 * Returns <tt>true</tt> if this deque contained the specified element
 * (or equivalently, if this deque changed as a result of the call).
 *
 * <p>This method is equivalent to {@link #removeFirstOccurrence}.
 *
 * @param o element to be removed from this deque, if present
 * @return <tt>true</tt> if this deque contained the specified element
 */
public boolean remove(Object o) {
  return removeFirstOccurrence(o);
}

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

/**
 * Removes a single instance of the specified element from this deque.
 * If the deque does not contain the element, it is unchanged.
 * More formally, removes the first element <tt>e</tt> such that
 * <tt>o.equals(e)</tt> (if such an element exists).
 * Returns <tt>true</tt> if this deque contained the specified element
 * (or equivalently, if this deque changed as a result of the call).
 *
 * <p>This method is equivalent to {@link #removeFirstOccurrence}.
 *
 * @param o element to be removed from this deque, if present
 * @return <tt>true</tt> if this deque contained the specified element
 */
public boolean remove(Object o) {
  return removeFirstOccurrence(o);
}

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

/**
 * Removes a single instance of the specified element from this deque.
 * If the deque does not contain the element, it is unchanged.
 * More formally, removes the first element <tt>e</tt> such that
 * <tt>o.equals(e)</tt> (if such an element exists).
 * Returns <tt>true</tt> if this deque contained the specified element
 * (or equivalently, if this deque changed as a result of the call).
 *
 * <p>This method is equivalent to {@link #removeFirstOccurrence}.
 *
 * @param o element to be removed from this deque, if present
 * @return <tt>true</tt> if this deque contained the specified element
 */
public boolean remove(Object o) {
  return removeFirstOccurrence(o);
}

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

/**
 * Removes a single instance of the specified element from this deque.
 * If the deque does not contain the element, it is unchanged.
 * More formally, removes the first element <tt>e</tt> such that
 * <tt>o.equals(e)</tt> (if such an element exists).
 * Returns <tt>true</tt> if this deque contained the specified element
 * (or equivalently, if this deque changed as a result of the call).
 *
 * <p>This method is equivalent to {@link #removeFirstOccurrence}.
 *
 * @param o element to be removed from this deque, if present
 * @return <tt>true</tt> if this deque contained the specified element
 */
public boolean remove(Object o) {
  return removeFirstOccurrence(o);
}

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

/**
 * Removes a single instance of the specified element from this deque.
 * If the deque does not contain the element, it is unchanged.
 * More formally, removes the first element <tt>e</tt> such that
 * <tt>o.equals(e)</tt> (if such an element exists).
 * Returns <tt>true</tt> if this deque contained the specified element
 * (or equivalently, if this deque changed as a result of the call).
 *
 * <p>This method is equivalent to {@link #removeFirstOccurrence}.
 *
 * @param o element to be removed from this deque, if present
 * @return <tt>true</tt> if this deque contained the specified element
 */
public boolean remove(Object o) {
  return removeFirstOccurrence(o);
}

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

/**
 * Removes a single instance of the specified element from this deque.
 * If the deque does not contain the element, it is unchanged.
 * More formally, removes the first element <tt>e</tt> such that
 * <tt>o.equals(e)</tt> (if such an element exists).
 * Returns <tt>true</tt> if this deque contained the specified element
 * (or equivalently, if this deque changed as a result of the call).
 *
 * <p>This method is equivalent to {@link #removeFirstOccurrence}.
 *
 * @param o element to be removed from this deque, if present
 * @return <tt>true</tt> if this deque contained the specified element
 */
public boolean remove(Object o) {
  return removeFirstOccurrence(o);
}

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

/**
 * Removes a single instance of the specified element from this deque.
 * If the deque does not contain the element, it is unchanged.
 * More formally, removes the first element <tt>e</tt> such that
 * <tt>o.equals(e)</tt> (if such an element exists).
 * Returns <tt>true</tt> if this deque contained the specified element
 * (or equivalently, if this deque changed as a result of the call).
 *
 * <p>This method is equivalent to {@link #removeFirstOccurrence}.
 *
 * @param o element to be removed from this deque, if present
 * @return <tt>true</tt> if this deque contained the specified element
 */
public boolean remove(Object o) {
  return removeFirstOccurrence(o);
}

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

/**
 * Removes a single instance of the specified element from this deque.
 * If the deque does not contain the element, it is unchanged.
 * More formally, removes the first element <tt>e</tt> such that
 * <tt>o.equals(e)</tt> (if such an element exists).
 * Returns <tt>true</tt> if this deque contained the specified element
 * (or equivalently, if this deque changed as a result of the call).
 *
 * <p>This method is equivalent to {@link #removeFirstOccurrence}.
 *
 * @param o element to be removed from this deque, if present
 * @return <tt>true</tt> if this deque contained the specified element
 */
public boolean remove(Object o) {
  return removeFirstOccurrence(o);
}

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

/**
 * Removes a single instance of the specified element from this deque.
 * If the deque does not contain the element, it is unchanged.
 * More formally, removes the first element <tt>e</tt> such that
 * <tt>o.equals(e)</tt> (if such an element exists).
 * Returns <tt>true</tt> if this deque contained the specified element
 * (or equivalently, if this deque changed as a result of the call).
 *
 * <p>This method is equivalent to {@link #removeFirstOccurrence}.
 *
 * @param o element to be removed from this deque, if present
 * @return <tt>true</tt> if this deque contained the specified element
 */
public boolean remove(Object o) {
  return removeFirstOccurrence(o);
}

相关文章

微信公众号

最新文章

更多