public boolean isAmbiguousWith(PathTemplate other) {
		if(this.isGreedy() || other.isGreedy()) {
			PathTemplate shortest = this;
			PathTemplate longest = other;
			if(this.pathElementTemplates.size() > other.pathElementTemplates.size()) {
				shortest = other;
				longest = this;
			}
			Iterator<PathElementTemplate> iterShort = shortest.pathElementTemplates
					.iterator();
			Iterator<PathElementTemplate> iterLong = longest.pathElementTemplates
					.iterator();
			while (iterShort.hasNext()) {
				PathElementTemplate eltShort = iterShort.next();
				PathElementTemplate eltLong = iterLong.next();
				if (!areAmbiguous(eltShort, eltLong))
					return false;
			}
			return true;
		} else {
			if (pathElementTemplates.size() != other.pathElementTemplates.size())
				return false;
			Iterator<PathElementTemplate> iterThis = pathElementTemplates
					.iterator();
			Iterator<PathElementTemplate> iterThat = other.pathElementTemplates
					.iterator();
			while (iterThis.hasNext()) {
				PathElementTemplate eltThis = iterThis.next();
				PathElementTemplate eltThat = iterThat.next();
				if (!areAmbiguous(eltThis, eltThat))
					return false;
			}
			return true;
		}
	}