/** * The {@link #toString()} implementation is overridden to return the XPath * string that represents the path. */ @Override public String toString() { if (steps.isEmpty()) { return "."; } StringBuilder builder = new StringBuilder(); for (MetadataKey<?> step : steps) { addPathSeparator(builder); if (step instanceof AttributeKey) { builder.append('@'); } builder.append(step.getId()); } return builder.toString(); }
/** * The {@link #toString()} implementation is overridden to return the XPath * string that represents the path. */ @Override public String toString() { if (steps.isEmpty()) { return "."; } StringBuilder builder = new StringBuilder(); for (MetadataKey<?> step : steps) { addPathSeparator(builder); if (step instanceof AttributeKey) { builder.append('@'); } builder.append(step.getId()); } return builder.toString(); }
/** * The {@link #toString()} implementation is overridden to return the XPath * string that represents the path. */ @Override public String toString() { if (steps.isEmpty()) { return "."; } StringBuilder builder = new StringBuilder(); for (MetadataKey<?> step : steps) { addPathSeparator(builder); if (step instanceof AttributeKey) { builder.append('@'); } builder.append(step.getId()); } return builder.toString(); }