public Father getPatriarch() { Father elder = father; while (elder != null) { if (elder == this) { throw new IllegalStateException("Impossible state"); // fail fast during infinite loop } elder = elder.getFather(); } return elder; }