Java Collection Equal indexOfEquals(Collection collection, T element)

Here you can find the source of indexOfEquals(Collection collection, T element)

Description

index Of Equals

License

Open Source License

Declaration

public static <T> int indexOfEquals(Collection<T> collection, T element) 

Method Source Code

//package com.java2s;

import java.util.Collection;

public class Main {
    public static <T> int indexOfEquals(Collection<T> collection, T element) {
        int pos = 0;
        for (T e : collection) {
            if (element.equals(e))
                return pos;
            pos++;/* w w  w.ja  v a  2 s . co m*/
        }
        return -1;
    }
}

Related

  1. equalsUnordered(Collection collection1, Collection collection2)
  2. equalsUnordered(Collection collection1, Collection collection2)
  3. equalsUnorderedCollections(Collection a, Collection b)
  4. equalTestData(Collection receivedDataSet)
  5. getContainedEquals(Collection a, T b)
  6. isCollectionEqual(Collection c1, Collection c2)
  7. isCollectionsEqual(Collection f1, Collection f2)
  8. isContentEqual(final Collection collectionA, final Collection collectionB)
  9. isEqual(Collection left, Collection right)