class SubjectIdentityDecider implements DeciderIF<T> {

  @Override
  public boolean ok(T object) {
    if (object instanceof TopicIF) {
      TopicIF topic = (TopicIF) object;
      if (topic.getSubjectIdentifiers().contains(subject_identifier))
        return true;
    }
      
    if (object instanceof TypedIF) {
      TopicIF topic = ((TypedIF) object).getType();
      if (topic == null)
        return false;
      return topic.getSubjectIdentifiers().contains(subject_identifier);
      
    } else if (object instanceof TopicIF) {
      Iterator<TopicIF> it = ((TopicIF) object).getTypes().iterator();
      while (it.hasNext()) {
        TopicIF topic = it.next();
        if (topic.getSubjectIdentifiers().contains(subject_identifier))
          return true;
      }
    } 

    return false;
  }

  public  SubjectIdentityDecider(LocatorIF subject_identifier);

}