public static void fillRepoLinks(final ChannelInformation channel,final List<MenuEntry> links,final String baseName,final int basePriority,final String prefix,final int priorityOffset,final Function<String,LinkTarget> targetFunction){
  Objects.requireNonNull(channel,"'channel' must not be null");
  Objects.requireNonNull(links,"'links' must not be null");
  Objects.requireNonNull(baseName,"'baseName' must not be null");
  Objects.requireNonNull(prefix,"'prefix' must not be null");
  Objects.requireNonNull(targetFunction,"'targetFunction' must not be null");
  links.add(new MenuEntry(baseName,basePriority,prefix + " (by ID)",priorityOffset,targetFunction.apply(channel.getId()),Modifier.LINK,null));
  int i=1;
  for (  final String name : channel.getNames()) {
    final LinkTarget target=targetFunction.apply(name);
    if (target != null) {
      links.add(new MenuEntry(baseName,basePriority,String.format("%s (name: %s)",prefix,name),priorityOffset + i,target,Modifier.LINK,null));
    }
    i++;
  }
}

public static void fillRepoLinks ( final ChannelInformation channel , final List < MenuEntry > links , final String baseName , final int basePriority , final String prefix , final int priorityOffset , final Function < String , LinkTarget > targetFunction ) { Objects . requireNonNull ( channel , "'channel' must not be null" ) ; Objects . requireNonNull ( links , "'links' must not be null" ) ; Objects . requireNonNull ( baseName , "'baseName' must not be null" ) ; Objects . requireNonNull ( prefix , "'prefix' must not be null" ) ; Objects . requireNonNull ( targetFunction , "'targetFunction' must not be null" ) ; links . add ( new MenuEntry ( baseName , basePriority , prefix + " (by ID)" , priorityOffset , targetFunction . apply ( channel . getId ( ) ) , Modifier . LINK , null ) ) ; int i = 1 ; for ( final String name : channel . getNames ( ) ) { final LinkTarget target = targetFunction . apply ( name ) ; if ( target != null ) { links . add ( new MenuEntry ( baseName , basePriority , String . format ( "%s (name: %s)" , prefix , name ) , priorityOffset + i , target , Modifier . LINK , null ) ) ; } i ++ ; } }
create a set of default repository links
