/** * Can be overloaded */ @Override public TermType getCommonDenominator(TermType otherTermType){ if (equals(otherTermType)) return this; if (ancestry.contains(otherTermType)) return otherTermType; TermTypeAncestry otherAncestry = otherTermType.getAncestry(); if (otherAncestry.contains(this)) return this; return ancestry.getClosestCommonAncestor(otherAncestry); }