Beispiel #1
0
  public String toString() {
    StringBuilder buffer = new StringBuilder();

    buffer.append("Hosts:     ").append(this.getHosts().size()).append("\n");
    buffer.append("Sites:     ").append(this.sites.size()).append("\n");
    buffer.append("Fragments: ").append(this.fragments.size()).append("\n");

    SortedSet<String> hosts = new TreeSet<String>();
    hosts.addAll(this.getHosts());

    for (String host_key : hosts) {
      buffer.append("\nHost ").append(CatalogKey.getNameFromKey(host_key)).append("\n");
      for (SiteEntry site : this.host_site_xref.get(host_key)) {
        buffer.append(SPACER).append("Site ").append(site.getId()).append("\n");
        for (FragmentEntry fragment : site.getFragments()) {
          buffer
              .append(SPACER)
              .append(SPACER)
              .append("Fragment ")
              .append(fragment)
              .append(" Size=")
              .append(fragment.getEstimatedSize())
              .append(" Heat=")
              .append(fragment.getEstimatedHeat())
              .append("\n");
        } // FOR
      } // FOR
      buffer.append("--------------------");
    } // FOR
    return (buffer.toString());
  }