Package net.sf.uadetector.internal.util

Examples of net.sf.uadetector.internal.util.AlphanumComparator


    if (other == null) {
      result = -1;
    } else {
      Check.notNull(other.getGroups(), "other.getGroups()");
      final int length = groups.size() < other.getGroups().size() ? groups.size() : other.getGroups().size();
      final AlphanumComparator comparator = new AlphanumComparator();
      result = comparator.compare(toVersionString(groups.subList(0, length)), toVersionString(other.getGroups().subList(0, length)));
      if (result == 0) {
        result = groups.size() > other.getGroups().size() ? 1 : groups.size() < other.getGroups().size() ? -1 : 0;
      }
      if (result == 0) {
        result = extension.compareTo(other.getExtension());
      }
      if (result == 0) {
        result = comparator.compare(toVersionString(), other.toVersionString());
      }
    }
    return result;
  }
View Full Code Here

TOP

Related Classes of net.sf.uadetector.internal.util.AlphanumComparator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.