Example usage for java.util Iterator equals

List of usage examples for java.util Iterator equals

Introduction

In this page you can find the example usage for java.util Iterator equals.

Prototype

public boolean equals(Object obj) 

Source Link

Document

Indicates whether some other object is "equal to" this one.

Usage

From source file:Main.java

public static <V> void splice(LinkedList<V> list, Iterator<V> iterator, LinkedList<V> list2, V v) {
    list2.remove(v);//from ww  w  .j  a va2s .  c  o  m
    assert (iterator.equals(list.iterator()));

    list.addFirst(v);
}