/** * Compares the relative fitness of two sets of parameter types in terms of * matching a third set of runtime parameter types, such that a list ordered * by the results of the comparison would return the best match first * (least). * * @param left the "left" parameter set * @param right the "right" parameter set * @param actual the runtime parameter types to match against * {@code left}/{@code right} * @return int consistent with {@code compare} semantics */ private static int compareParameterTypes(Class<?>[] left, Class<?>[] right, Class<?>[] actual) { final float leftCost = getTotalTransformationCost(actual, left); final float rightCost = getTotalTransformationCost(actual, right); return Float.compare(leftCost, rightCost); }
/** * Compares the relative fitness of two sets of parameter types in terms of * matching a third set of runtime parameter types, such that a list ordered * by the results of the comparison would return the best match first * (least). * * @param left the "left" parameter set * @param right the "right" parameter set * @param actual the runtime parameter types to match against * {@code left}/{@code right} * @return int consistent with {@code compare} semantics */ private static int compareParameterTypes(Class<?>[] left, Class<?>[] right, Class<?>[] actual) { final float leftCost = getTotalTransformationCost(actual, left); final float rightCost = getTotalTransformationCost(actual, right); return Float.compare(leftCost, rightCost); }
/** * Compares the relative fitness of two sets of parameter types in terms of * matching a third set of runtime parameter types, such that a list ordered * by the results of the comparison would return the best match first * (least). * * @param left the "left" parameter set * @param right the "right" parameter set * @param actual the runtime parameter types to match against * {@code left}/{@code right} * @return int consistent with {@code compare} semantics */ private static int compareParameterTypes(Class<?>[] left, Class<?>[] right, Class<?>[] actual) { final float leftCost = getTotalTransformationCost(actual, left); final float rightCost = getTotalTransformationCost(actual, right); return Float.compare(leftCost, rightCost); }
/** * Compares the relative fitness of two sets of parameter types in terms of * matching a third set of runtime parameter types, such that a list ordered * by the results of the comparison would return the best match first * (least). * * @param left the "left" parameter set * @param right the "right" parameter set * @param actual the runtime parameter types to match against * {@code left}/{@code right} * @return int consistent with {@code compare} semantics */ private static int compareParameterTypes(Class<?>[] left, Class<?>[] right, Class<?>[] actual) { final float leftCost = getTotalTransformationCost(actual, left); final float rightCost = getTotalTransformationCost(actual, right); return Float.compare(leftCost, rightCost); }