/** * Append the string representation of this instance to the * <code>sb</code> buffer. * @param sb The buffer to append to * @param rangeSafe If <code>true</code>, the range delimiters will be escaped * with backslash. */ void toString(StringBuffer sb, boolean rangeSafe) { toString(sb, vector, padValue, rangeSafe); }
/** * Append the string representation of this instance to the * <code>sb</code> buffer. * @param sb The buffer to append to */ public void toString(StringBuffer sb) { toString(sb, vector, padValue, false); }
/** * Appends the raw format for this version onto the <code>sb</code> StringBuffer. * @param sb The buffer that will receive the raw string format * @param rangeSafe Set to <code>true</code> if range delimiters should be escaped */ public void rawToString(StringBuffer sb, boolean rangeSafe) { VersionVector.toString(sb, vector, padValue, rangeSafe); }
public String toString() { StringBuffer sb = new StringBuffer(); toString(sb); return sb.toString(); }
static void rawToString(StringBuffer sb, boolean forRange, Comparable<?> e) { if (e instanceof String) { writeQuotedString(sb, forRange, (String) e, '\'', 0, false); } else if (e instanceof VersionVector) { sb.append('<'); ((VersionVector) e).toString(sb, forRange); sb.append('>'); } else if (e instanceof EnumDefinition.EnumSegment) ((EnumDefinition.EnumSegment) e).toString(sb); else sb.append(e); }
/** * Appends the string representation of this version onto the * <code>sb</code> StringBuffer. * @param sb The buffer that will receive the version string */ public void toString(StringBuffer sb) { if (this == emptyVersion) sb.append("0.0.0"); //$NON-NLS-1$ else { sb.append(RAW_PREFIX); VersionVector.toString(sb, vector, padValue, false); if (format != null || original != null) { sb.append('/'); if (format != null) format.toString(sb); if (original != null) { sb.append(':'); originalToString(sb, false); } } } }