Java Network Interface Check sortInterfaces(List interfaces)

Here you can find the source of sortInterfaces(List interfaces)

Description

sort Interfaces

License

Apache License

Declaration

private static void sortInterfaces(List<NetworkInterface> interfaces) 

Method Source Code

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

import java.net.NetworkInterface;

import java.util.Collections;
import java.util.Comparator;

import java.util.List;

public class Main {
    private static void sortInterfaces(List<NetworkInterface> interfaces) {
        Collections.sort(interfaces, new Comparator<NetworkInterface>() {
            @Override//www .  j ava  2 s  .  c  om
            public int compare(NetworkInterface o1, NetworkInterface o2) {
                return Integer.compare(o1.getIndex(), o2.getIndex());
            }
        });
    }
}

Related

  1. isNetworkException(Exception e)
  2. isNetworkProblem(final Throwable ex)
  3. isUpAndNotLoopback(final NetworkInterface ni)
  4. printInterface(NetworkInterface netIf)
  5. retrieveNetworkInterfaces()