@Test(expected = IllegalArgumentException.class) public void createWithEmptyList() { QualifiedName.create(Collections.emptyList()); }
public static QualifiedName create(List<String> base) { if (base.isEmpty()) { throw new IllegalArgumentException(); } else if (base.size() == 1) { return new QualifiedName(base.get(0)); } else { return new QualifiedName(QualifiedName.create(base.subList(0, base.size() - 1)), base.get(base.size() - 1)); } }
QualifiedName extends Node { public static QualifiedName create(List<String> base) { if (base.isEmpty()) { throw new IllegalArgumentException(); } else if (base.size() == 1) { return new QualifiedName(base.get(0)); } else { return new QualifiedName(QualifiedName.create(base.subList(0, base.size() - 1)), base.get(base.size() - 1)); } } }
QualifiedName extends Node { public static QualifiedName create(List<String> base) { if (base.isEmpty()) { throw new IllegalArgumentException(); } else if (base.size() == 1) { return new QualifiedName(base.get(0)); } else { return new QualifiedName(QualifiedName.create(base.subList(0, base.size() - 1)), base.get(base.size() - 1)); } } QualifiedName(QualifiedName base, String name);  QualifiedName(String name); }
QualifiedName extends Node { public static QualifiedName create(List<String> base) { if (base.isEmpty()) { throw new IllegalArgumentException(); } else if (base.size() == 1) { return new QualifiedName(base.get(0)); } else { return new QualifiedName(QualifiedName.create(base.subList(0, base.size() - 1)), base.get(base.size() - 1)); } } QualifiedName(QualifiedName base, String name);  QualifiedName(String name); static QualifiedName create(List<String> base); QualifiedName getBase(); String getName(); boolean isSimpleName(); @Override Iterable<Node> getChildren(); String qualifiedName(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); String firstSegment(); QualifiedName rest(); static QualifiedName create(String path); }
QualifiedName extends Node { public static QualifiedName create(List<String> base) { if (base.isEmpty()) { throw new IllegalArgumentException(); } else if (base.size() == 1) { return new QualifiedName(base.get(0)); } else { return new QualifiedName(QualifiedName.create(base.subList(0, base.size() - 1)), base.get(base.size() - 1)); } } QualifiedName(QualifiedName base, String name);  QualifiedName(String name); static QualifiedName create(List<String> base); QualifiedName getBase(); String getName(); boolean isSimpleName(); @Override Iterable<Node> getChildren(); String qualifiedName(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); String firstSegment(); QualifiedName rest(); static QualifiedName create(String path);  }