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

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

Introduction

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

Prototype

@Override
public boolean equals(Object o) 

Source Link

Document

Returns true iff o is a DoubleWritable with the same value.

Usage

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

License:Apache License

@Override
public int indexOf(Object o) {
    int index = -1;
    int myIndex = -1;
    Iterator<DoubleWritable> iter = this.iterator();
    while (iter.hasNext()) {
        index++;/* w  ww  .  j  av  a  2s.  c  o  m*/
        DoubleWritable e = iter.next();
        if (e.equals(o)) {
            myIndex = index;
            break;
        }
    }
    return myIndex;
}

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

License:Apache License

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

}