Example usage for org.apache.hadoop.io MapWritable equals

List of usage examples for org.apache.hadoop.io MapWritable equals

Introduction

In this page you can find the example usage for org.apache.hadoop.io MapWritable equals.

Prototype

@Override
    public boolean equals(Object obj) 

Source Link

Usage

From source file:com.axiomine.largecollections.turboutil.MapWritableList.java

License:Apache License

@Override
public int indexOf(Object o) {
    int index = -1;
    int myIndex = -1;
    Iterator<MapWritable> iter = this.iterator();
    while (iter.hasNext()) {
        index++;//from  w w w .j  av a2  s.  co m
        MapWritable e = iter.next();
        if (e.equals(o)) {
            myIndex = index;
            break;
        }
    }
    return myIndex;
}

From source file:com.axiomine.largecollections.turboutil.MapWritableList.java

License:Apache License

@Override
public int lastIndexOf(Object o) {
    int index = -1;
    int myIndex = -1;
    Iterator<MapWritable> iter = this.iterator();
    while (iter.hasNext()) {
        index++;/*from   w w w.  ja  v  a  2  s.  co m*/
        MapWritable e = iter.next();
        if (e.equals(o)) {
            myIndex = index;
        }
    }
    return myIndex;

}