package jalview.ext.archaeopteryx; import jalview.datamodel.SequenceI; import java.util.Map; /** * Note that this will take anything as a Tree or TreeNode object as no * assumptions can be made about the inheritance structure of Tree or TreeNode * (besides being Objects). * * @author kjvanderheide * * @param * Tree object that the tree viewer requires. * @param * Tree node object that the tree viewer requires. */ interface ExternalTreeBuilderI { public T buildTree(N treeRoot); public T buildTree(); public Map getAlignmentBoundNodes(); public Map getNodesBoundAlignment(); public String generateTreeName(); /** * probably move * * @param map * @param key * @param value * @return */ static Map putWithDuplicationCheck(Map map, K key, V value) { if (!map.containsKey(key)) { map.put(key, value); } else { jalview.bin.Cache.log.warn( "Attempt to add duplicate entry detected for map with key: " + key.toString() + " and value: " + value.toString()); } return map; } }