package us.kbase.typedobj.core;

import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;

public class ObjectPaths implements Iterable<String> {
	
	private final List<String> paths;
	
	public ObjectPaths(final List<String> paths) {
		if (paths == null) {
			this.paths = new LinkedList<String>();
		} else {
			this.paths = Collections.unmodifiableList(
					new LinkedList<String>(paths));
		}
	}

	@Override
	public Iterator<String> iterator() {
		return paths.iterator();
	}
	
	public int size() {
		return paths.size();
	}
	
	public boolean isEmpty() {
		return paths.isEmpty();
	}
	
	public List<String> getPaths() {
		return new LinkedList<String>(paths);
	}

	@Override
	public String toString() {
		return "ObjectPaths [paths=" + paths + "]";
	}
}

@@ -317,16 +317,51 @@
 paths = 
+Collections.unmodifiableList(%0A%09%09%09%09%09
 new Link
@@ -376,16 +376,17 @@
 tring%3E()
+)
 ;%0A%09%09%7D el
@@ -783,24 +783,24 @@
 oString() %7B%0A
-
 %09%09return %22Ob
@@ -835,11 +835,539 @@
  %22%5D%22;%0A%09%7D
+%0A%0A%09@Override%0A%09public int hashCode() %7B%0A%09%09final int prime = 31;%0A%09%09int result = 1;%0A%09%09result = prime * result + ((paths == null) ? 0 : paths.hashCode());%0A%09%09return result;%0A%09%7D%0A%0A%09@Override%0A%09public boolean equals(Object obj) %7B%0A%09%09if (this == obj)%0A%09%09%09return true;%0A%09%09if (obj == null)%0A%09%09%09return false;%0A%09%09if (getClass() != obj.getClass())%0A%09%09%09return false;%0A%09%09ObjectPaths other = (ObjectPaths) obj;%0A%09%09if (paths == null) %7B%0A%09%09%09if (other.paths != null)%0A%09%09%09%09return false;%0A%09%09%7D else if (!paths.equals(other.paths))%0A%09%09%09return false;%0A%09%09return true;%0A%09%7D
 %0A%7D%0A

Add hashCode and equals to ObjectPaths