@Override
    public int compare(Dimension dim1, Dimension dim2) {
        int result = nullCompare(dim1, dim2);
        if (result == NON_NULLS) {
            result = nullSafeCompare(dim1.getName(), dim2.getName());
            if (result == 0) {
                return nullSafeCompare(dim1.getValue(), dim2.getValue());
            }
        }
        return result;
    }
Used to indicate the two objects being compared are both non-nulls.
aws-java-sdk-cloudwatchmetrics/src/main/java/com/amazonaws/metrics/internal/cloudwatch/DimensionComparator.java