public boolean isConstructedFrom(TimeUnit atomUnit) {
return myGraph.getComposition(this, atomUnit) != null;
}
public int getAtomCount(TimeUnit atomUnit) {
Composition composition = myGraph.getComposition(this, atomUnit);
if (composition == null) {
throw new RuntimeException(
"Failed to find a composition of time unit=" + this
+ " from time unit=" + atomUnit);
}
return composition.getAtomCount();
}