本文整理了Java中java.util.LinkedList.removeLastOccurrence()
方法的一些代码示例,展示了LinkedList.removeLastOccurrence()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LinkedList.removeLastOccurrence()
方法的具体详情如下:
包路径:java.util.LinkedList
类名称:LinkedList
方法名:removeLastOccurrence
[英]Removes the last occurrence of the specified element in this list (when traversing the list from head to tail). If the list does not contain the element, it is unchanged.
[中]删除此列表中指定元素的最后一个匹配项(从头到尾遍历列表时)。如果列表不包含该元素,则该元素将保持不变。
代码示例来源:origin: spotbugs/spotbugs
@ExpectWarning("GC")
public void test() {
LinkedList<Integer> lst = new LinkedList<Integer>();
lst.add(1);
lst.add(2);
lst.add(3);
lst.removeFirstOccurrence("a");
lst.removeLastOccurrence("a");
Vector<Integer> v = new Vector<Integer>();
v.addAll(lst);
v.indexOf((long) 1, 1);
v.lastIndexOf((long) 1, 1);
}
代码示例来源:origin: apache/ignite
nodes.removeLastOccurrence(thisNode);
代码示例来源:origin: com.jtransc/jtransc-rt
@Override
public boolean removeLastOccurrence(Object o) {
return queue.removeLastOccurrence(o);
}
代码示例来源:origin: com.daioware.collections/concurrent
@Override
public synchronized boolean removeLastOccurrence(Object o) {
return super.removeLastOccurrence(o);
}
代码示例来源:origin: com.virjar/dungproxy-client
@Override
public boolean removeLastOccurrence(Object o) {
lock.lock();
try {
return super.removeLastOccurrence(o);
} finally {
lock.unlock();
}
}
代码示例来源:origin: org.apache.openejb.patch/openjpa
@Override
public boolean removeLastOccurrence(Object paramObject) {
if (_directAccess) {
return super.removeLastOccurrence(paramObject);
}
if (isDelayLoad()) {
load();
}
Proxies.dirty(this, true);
return super.removeLastOccurrence(paramObject);
}
代码示例来源:origin: org.apache.openjpa/openjpa-all
@Override
public boolean removeLastOccurrence(Object paramObject) {
if (_directAccess) {
return super.removeLastOccurrence(paramObject);
}
if (isDelayLoad()) {
load();
}
Proxies.dirty(this, true);
return super.removeLastOccurrence(paramObject);
}
代码示例来源:origin: org.apache.openjpa/openjpa-kernel
@Override
public boolean removeLastOccurrence(Object paramObject) {
if (_directAccess) {
return super.removeLastOccurrence(paramObject);
}
if (isDelayLoad()) {
load();
}
Proxies.dirty(this, true);
return super.removeLastOccurrence(paramObject);
}
代码示例来源:origin: org.apache.openejb.patch/openjpa-kernel
@Override
public boolean removeLastOccurrence(Object paramObject) {
if (_directAccess) {
return super.removeLastOccurrence(paramObject);
}
if (isDelayLoad()) {
load();
}
Proxies.dirty(this, true);
return super.removeLastOccurrence(paramObject);
}
代码示例来源:origin: SecUSo/privacy-friendly-sudoku
public void addState(GameBoard gameBoard) {
// don't add duplicates right after each other..
if(gameBoard.equals(states.get(activeState))) {
return;
}
LinkedList<GameBoard> deleteList = new LinkedList<>();
for(int i = 0; i < states.size(); i++) {
if (i > activeState) { // 3 states // state 1 is active // means 0,[1],2
// delete rest of the list // i > activeState // i > 1 // so i = 2 will be deleted // 0 can not be deleted
deleteList.add(states.get(i));
}
}
for(GameBoard g : deleteList) {
states.removeLastOccurrence(g);
}
// then append the current state
try {
GameBoard board = gameBoard.clone();
states.addLast(board);
activeState = states.size()-1;
} catch (CloneNotSupportedException e) {
e.printStackTrace();
}
}
代码示例来源:origin: net.digitalid.utility/utility-collections
@Impure
@Override
@NonFrozenRecipient
public boolean removeLastOccurrence(@NonCaptured @Unmodified @Nullable Object object) {
return super.removeLastOccurrence(object);
}
代码示例来源:origin: com.foreach.across/across-core
orderedModules.removeLastOccurrence( moduleToMove );
代码示例来源:origin: viadee/vPAV
predecessorVariablesList.removeLastOccurrence(pv);
代码示例来源:origin: org.apache.ignite/ignite-core
nodes.removeLastOccurrence(thisNode);
内容来源于网络,如有侵权,请联系作者删除!