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

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

Introduction

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

Prototype

@Override
public boolean equals(Object o) 

Source Link

Document

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

Usage

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

License:Apache License

@Override
public int indexOf(Object o) {
    int index = -1;
    int myIndex = -1;
    Iterator<FloatWritable> iter = this.iterator();
    while (iter.hasNext()) {
        index++;//  w  ww.  j a v a2 s  .com
        FloatWritable e = iter.next();
        if (e.equals(o)) {
            myIndex = index;
            break;
        }
    }
    return myIndex;
}

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

License:Apache License

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

}