private int compareTypeContainerName(String leftString, String rightString) { int leftLength= leftString.length(); int rightLength= rightString.length(); if (leftLength == 0 && rightLength > 0) return -1; if (leftLength == 0 && rightLength == 0) return 0; if (leftLength > 0 && rightLength == 0) return +1; return compareName(leftString, rightString); }
private int compareTypeContainerName(String leftString, String rightString) { int leftLength= leftString.length(); int rightLength= rightString.length(); if (leftLength == 0 && rightLength > 0) return -1; if (leftLength == 0 && rightLength == 0) return 0; if (leftLength > 0 && rightLength == 0) return +1; return compareName(leftString, rightString); }
private int compareTypeContainerName(String leftString, String rightString) { int leftLength= leftString.length(); int rightLength= rightString.length(); if (leftLength == 0 && rightLength > 0) return -1; if (leftLength == 0 && rightLength == 0) return 0; if (leftLength > 0 && rightLength == 0) return +1; return compareName(leftString, rightString); }
@Override public int compare(TypeNameMatch leftInfo, TypeNameMatch rightInfo) { int result= compareName(leftInfo.getSimpleTypeName(), rightInfo.getSimpleTypeName()); if (result != 0) return result; result= compareDeprecation(leftInfo.getModifiers(), rightInfo.getModifiers()); if (result != 0) return result; result= compareTypeContainerName(leftInfo.getTypeContainerName(), rightInfo.getTypeContainerName()); if (result != 0) return result; int leftCategory= getElementTypeCategory(leftInfo); int rightCategory= getElementTypeCategory(rightInfo); if (leftCategory < rightCategory) return -1; if (leftCategory > rightCategory) return +1; return compareContainerName(leftInfo, rightInfo); }
@Override public int compare(TypeNameMatch leftInfo, TypeNameMatch rightInfo) { int result= compareName(leftInfo.getSimpleTypeName(), rightInfo.getSimpleTypeName()); if (result != 0) return result; result= compareDeprecation(leftInfo.getModifiers(), rightInfo.getModifiers()); if (result != 0) return result; result= compareTypeContainerName(leftInfo.getTypeContainerName(), rightInfo.getTypeContainerName()); if (result != 0) return result; int leftCategory= getElementTypeCategory(leftInfo); int rightCategory= getElementTypeCategory(rightInfo); if (leftCategory < rightCategory) return -1; if (leftCategory > rightCategory) return +1; return compareContainerName(leftInfo, rightInfo); }
public int compare(Object left, Object right) { TypeNameMatch leftInfo= (TypeNameMatch) left; TypeNameMatch rightInfo= (TypeNameMatch) right; int result= compareName(leftInfo.getSimpleTypeName(), rightInfo.getSimpleTypeName()); if (result != 0) return result; result= compareTypeContainerName(leftInfo.getTypeContainerName(), rightInfo.getTypeContainerName()); if (result != 0) return result; int leftCategory= getElementTypeCategory(leftInfo); int rightCategory= getElementTypeCategory(rightInfo); if (leftCategory < rightCategory) return -1; if (leftCategory > rightCategory) return +1; return compareContainerName(leftInfo, rightInfo); }