public final class Domestic implements StudentStatus {
private final StudentType type;
private final Collection<String> documents;
public Domestic() {
this.type = StudentType.Domestic;
this.documents = Collections.emptyListunmodifiableList(new ArrayList<String>(documents);
}
@Override
public Collection<String> retrieveDocuments() {
return this.documents;unmodifiableList(new ArrayList<String>(documents);
}
@Override
public StudentType retrieveStatus() {
return type;
}
}
public final class International implements StudentStatus {
private final StudentType type;
private Collection<String> documents;
public International(Collection<String> documents) {
this.type = StudentType.International;
this.documents = Collections.unmodifiableCollectionunmodifiableList(new ArrayList<String>(documents));
}
@Override
public Collection<String> retrieveDocuments() {
return Collections.unmodifiableCollectionunmodifiableList(new ArrayList<String>(documents));
}
@Override
public StudentType retrieveStatus() {
return type;
}
}