package com.github.vangj.jbayes.inf.exact.graph.lpd;

import java.util.ArrayList;
import java.util.List;

/**
 * A potential. If it helps, think of a potential as a table.
 */
public class Potential {
  private List<PotentialEntry> entries;

  public Potential() {
    entries = new ArrayList<>();
  }

  public List<PotentialEntry> entries() {
    return entries;
  }

  public Potential addEntry(PotentialEntry entry) {
    entries.add(entry);
    return this;
  }
}

@@ -97,16 +97,52 @@
 il.List;
+%0Aimport java.util.stream.Collectors;
 %0A%0A/**%0A *
@@ -495,11 +495,186 @@
 his;%0A  %7D
+%0A%0A  @Override%0A  public String toString() %7B%0A    return entries.stream()%0A        .map(PotentialEntry::toString)%0A        .collect(Collectors.joining(System.lineSeparator()));%0A  %7D
 %0A%7D%0A

print value too with toString