org.squashtest.tm.service.internal.library
Class LibraryUtils

java.lang.Object
  extended by org.squashtest.tm.service.internal.library.LibraryUtils

public final class LibraryUtils
extends Object


Method Summary
static String generateNonClashingName(String source, Collection<String> siblings)
          Generates a non-clashing name for a "source" to be added amongst "siblings".
static String generateUniqueCopyName(List<String> copiesNames, String sourceName)
           
static int generateUniqueCopyNumber(List<String> copiesNames, String sourceName, String copyToken)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

generateUniqueCopyNumber

public static int generateUniqueCopyNumber(List<String> copiesNames,
                                           String sourceName,
                                           String copyToken)

generateUniqueCopyName

public static String generateUniqueCopyName(List<String> copiesNames,
                                            String sourceName)

generateNonClashingName

public static String generateNonClashingName(String source,
                                             Collection<String> siblings)
Generates a non-clashing name for a "source" to be added amongst "siblings". The non-clashing name is either the source (when no clash) or the source appended with "(n)"

Parameters:
source - the non null source name.
siblings - a non null collection of siblings of the source name
Returns:
a non clashing name


Copyright © 2010-2013 Henix, henix.fr. All Rights Reserved.