Comparator<Node> (boolean useNNumber) { if (useNNumber) { if (myNComparator == null) { myNComparator = Comparator.comparingInt(myNodeToNNumber); } return myNComparator; } else { if (myTComparator == null) { myTComparator = Comparator.comparingInt(myNodeToTNumber); } return myTComparator; } }