Java List First Item expectedOrder(List src, Object first, Object second)

Here you can find the source of expectedOrder(List src, Object first, Object second)

Description

expected Order

License

Apache License

Declaration

private static void expectedOrder(List<?> src, Object first, Object second) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.List;

public class Main {
    private static void expectedOrder(List<?> src, Object first, Object second) {
        int firstIndex = src.indexOf(first);
        int secondIndex = src.indexOf(second);

        if (firstIndex >= secondIndex) {
            throw new AssertionError("Wrong order for [" + first + ", " + second + "] in " + src);
        }/*from  www.  ja  v a 2s  . c  om*/
    }
}

Related

  1. addFirst(List list, Object values)
  2. addFirstAndRemoveOldIfNeed(List dest, List src)
  3. cons(P first, List list)
  4. equalLists(List first, List second)
  5. extractFirst(int numberToExtract, List list)
  6. first(final List list)
  7. first(final List list, final int oridinal)
  8. first(final List t)

  9. HOME | Copyright © www.java2s.com 2016