public int compare(ExternalReferenceSPI o1, ExternalReferenceSPI o2) { return (int) (o1.getResolutionCost() - o2 .getResolutionCost()); } });
public int compare(ExternalReferenceSPI o1, ExternalReferenceSPI o2) { return (int) (o1.getResolutionCost() - o2 .getResolutionCost()); } });
public int compare(ExternalReferenceSPI o1, ExternalReferenceSPI o2) { return (int) (o1.getResolutionCost() - o2 .getResolutionCost()); } });
public int compare(ExternalReferenceSPI o1, ExternalReferenceSPI o2) { return (int) (o1.getResolutionCost() - o2.getResolutionCost()); } });
public int compare(ExternalReferenceSPI o1, ExternalReferenceSPI o2) { return (int) (o1.getResolutionCost() - o2.getResolutionCost()); } });
public int compare(ExternalReferenceSPI o1, ExternalReferenceSPI o2) { return (int) (o1.getResolutionCost() - o2.getResolutionCost()); } });
/** * Return a human readable representation of this translation path, used by the logging * methods to print trace information. */ @SuppressWarnings("unchecked") @Override public String toString() { StringBuffer sb = new StringBuffer(); sb.append(getPathCost() + " "); if (sourceReference != null && initialBuilder != null) { sb.append(sourceReference.toString() + "->bytes(" + sourceReference.getResolutionCost() + ")->"); String builderClassName = initialBuilder.getClass().getSimpleName(); String builtType = initialBuilder.getReferenceType().getSimpleName(); sb.append("builder:" + builderClassName + "(" + initialBuilder.getConstructionCost() + "):<" + builtType + ">"); } else if (translators.isEmpty() == false) { sb.append("<" + translators.get(0).getSourceReferenceType().getSimpleName() + ">"); } for (ExternalReferenceTranslatorSPI translator : translators) { sb.append("-" + translator.getClass().getSimpleName() + "(" + translator.getTranslationCost() + ")" + "-"); sb.append("<" + translator.getTargetReferenceType().getSimpleName() + ">"); } return sb.toString(); }
if (sourceReference != null && initialBuilder != null) { sb.append(sourceReference.toString() + "->bytes(" + sourceReference.getResolutionCost() + ")->"); String builderClassName = initialBuilder.getClass() .getSimpleName();
if (sourceReference != null && initialBuilder != null) { sb.append(sourceReference.toString() + "->bytes(" + sourceReference.getResolutionCost() + ")->"); String builderClassName = initialBuilder.getClass() .getSimpleName();
/** * Sum of translation costs of all translators in path */ public float getPathCost() { float cost = 0.0f; for (ExternalReferenceTranslatorSPI<?, ?> ert : this) { cost += ert.getTranslationCost(); } // If the source reference and initial builder are non-null then // we're going to start this translation path by downloading a byte // stream from the specified (current) reference and using it to // construct the starting point for the translation path via the // specified builder. if (sourceReference != null) { cost += sourceReference.getResolutionCost(); } if (initialBuilder != null) { cost += initialBuilder.getConstructionCost(); } return cost; }
/** * Sum of translation costs of all translators in path */ public float getPathCost() { float cost = 0.0f; for (ExternalReferenceTranslatorSPI<?, ?> ert : this) { cost += ert.getTranslationCost(); } // If the source reference and initial builder are non-null then // we're going to start this translation path by downloading a byte // stream from the specified (current) reference and using it to // construct the starting point for the translation path via the // specified builder. if (sourceReference != null) { cost += sourceReference.getResolutionCost(); } if (initialBuilder != null) { cost += initialBuilder.getConstructionCost(); } return cost; }
/** * Sum of translation costs of all translators in path */ public float getPathCost() { float cost = 0.0f; for (ExternalReferenceTranslatorSPI<?, ?> ert : this) { cost += ert.getTranslationCost(); } // If the source reference and initial builder are non-null then // we're going to start this translation path by downloading a byte // stream from the specified (current) reference and using it to // construct the starting point for the translation path via the // specified builder. if (sourceReference != null) { cost += sourceReference.getResolutionCost(); } if (initialBuilder != null) { cost += initialBuilder.getConstructionCost(); } return cost; }
|| ers.getResolutionCost() < cheapestReferenceCost) { cheapestReference = ers; cheapestReferenceCost = ers.getResolutionCost();
|| ers.getResolutionCost() < cheapestReferenceCost) { cheapestReference = ers; cheapestReferenceCost = ers.getResolutionCost();
|| ers.getResolutionCost() < cheapestReferenceCost) { cheapestReference = ers; cheapestReferenceCost = ers.getResolutionCost();