- private Map<String, String> createLink(String target, String name) {
- Map<String, String> link = new HashMap<String, String>();
- link.put("target", target);
- link.put("name", name);
- return link;
+ private static class Link {
+
+ /** The target of the link. */
+ private final String target;
+
+ /** The name of the link. */
+ private final String name;
+
+ /**
+ * Creates a new link.
+ *
+ * @param target
+ * The target of the link
+ * @param name
+ * The name of the link
+ */
+ private Link(String target, String name) {
+ this.target = target;
+ this.name = name;
+ }
+
+ //
+ // ACCESSORS
+ //
+
+ /**
+ * Returns the target of the link.
+ *
+ * @return The target of the link
+ */
+ public String getTarget() {
+ return target;
+ }
+
+ /**
+ * Returns the name of the link.
+ *
+ * @return The name of the link
+ */
+ public String getName() {
+ return name;
+ }
+