Uses of Class
de.xima.fc.common.text.UniqueNameGenerationHelper.NameGenerationOptions
Packages that use UniqueNameGenerationHelper.NameGenerationOptions
-
Uses of UniqueNameGenerationHelper.NameGenerationOptions in de.xima.fc.common.text
Methods in de.xima.fc.common.text that return UniqueNameGenerationHelper.NameGenerationOptionsModifier and TypeMethodDescriptionUniqueNameGenerationHelper.NameGenerationOptions.copyWithIndex(String separator) Sets an interpolator so that the generated names are likeMyEntity 4.UniqueNameGenerationHelper.NameGenerationOptions.copyWithSpace(String copyName) Sets an interpolator so that the generated names are likeMyEntity (Copy 4).UniqueNameGenerationHelper.NameGenerationOptions.copyWithSuffixAndIndex(String copySuffix, String separator) Sets an interpolator so that the generated names are likeMyEntity_Copy_4.UniqueNameGenerationHelper.NameGenerationOptions.create()Creates a new instance of the name generation options, with the default values.UniqueNameGenerationHelper.NameGenerationOptions.interpolator(BiFunction<? super String, ? super Integer, ? extends String> interpolator) Sets the interpolator for generating candidate names.UniqueNameGenerationHelper.NameGenerationOptions.maxAttempts(int maxAttempts) Sets the maximum number of attempts to make for generating a new name before giving up.UniqueNameGenerationHelper.NameGenerationOptions.maxLength(int maxLength) Sets the maximum length that is allowed for the name.UniqueNameGenerationHelper.NameGenerationOptions.replace(String disallowedCharactersRegex, char replacementCharacter) Sets a sanitizer so that, when generating the new name, replaces all matches for the given regex with the given replacement.UniqueNameGenerationHelper.NameGenerationOptions.sanitizer(Function<? super String, ? extends String> sanitizer) Sets the sanitizer that takes a generated name and sanitizes it.UniqueNameGenerationHelper.NameGenerationOptions.startIndex(int startIndex) Sets the initial index used for generating new names.UniqueNameGenerationHelper.NameGenerationOptions.validityCheck(Predicate<? super String> validityCheck) Sets the validity check that tests whether a given generated name is allowed.Methods in de.xima.fc.common.text with parameters of type UniqueNameGenerationHelper.NameGenerationOptionsModifier and TypeMethodDescriptionstatic StringUniqueNameGenerationHelper.generateNewName(String candidateName, UniqueNameGenerationHelper.NameGenerationOptions options) Sometimes a new name needs to be generated for an entity, but not all names are allowed.