public class FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat extends Object implements GroupNamingConvention
Modifier and Type | Class and Description |
---|---|
static class |
FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.Factory |
Modifier and Type | Field and Description |
---|---|
protected char |
delimiter |
protected Validator<String> |
groupValidator |
protected String |
prefix |
protected String |
sharedFormat |
protected Pattern |
sharedGroupPattern |
protected com.google.common.base.Supplier<String> |
suffixSupplier |
protected String |
uniqueFormat |
protected Pattern |
uniqueGroupPattern |
Constructor and Description |
---|
FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat(String prefix,
char delimiter,
com.google.common.base.Supplier<String> suffixSupplier,
Validator<String> groupValidator) |
Modifier and Type | Method and Description |
---|---|
protected String |
checkGroup(String group) |
com.google.common.base.Predicate<String> |
containsAnyGroup()
A predicate that identifies if an input has any group encoded in it.
|
com.google.common.base.Predicate<String> |
containsGroup(String group)
A predicate that identifies if an input has the given group encoded in it.
|
String |
extractGroup(String encoded)
Extracts the group from a shared/unique name.
|
protected String |
firstGroupInPatternOrNull(Pattern pattern,
String encoded) |
String |
groupInSharedNameOrNull(String encoded)
retrieve the group associated with the encoded name
|
String |
groupInUniqueNameOrNull(String encoded)
retrieve the group associated with the encoded name
|
String |
sharedNameForGroup(String group)
encodes the {code group parameter} into a name that exists only once in
the group.
|
String |
uniqueNameForGroup(String group)
encodes the {code group parameter} into a name that exists more than once
in the group.
|
protected final String prefix
protected final char delimiter
protected final com.google.common.base.Supplier<String> suffixSupplier
protected final String sharedFormat
protected final String uniqueFormat
protected final Pattern uniqueGroupPattern
protected final Pattern sharedGroupPattern
public String sharedNameForGroup(String group)
GroupNamingConvention
sharedNameForGroup
in interface GroupNamingConvention
public String uniqueNameForGroup(String group)
GroupNamingConvention
uniqueNameForGroup
in interface GroupNamingConvention
public String groupInUniqueNameOrNull(String encoded)
GroupNamingConvention
groupInUniqueNameOrNull
in interface GroupNamingConvention
protected String firstGroupInPatternOrNull(Pattern pattern, String encoded)
public String groupInSharedNameOrNull(String encoded)
GroupNamingConvention
groupInSharedNameOrNull
in interface GroupNamingConvention
public com.google.common.base.Predicate<String> containsGroup(String group)
GroupNamingConvention
containsGroup
in interface GroupNamingConvention
public com.google.common.base.Predicate<String> containsAnyGroup()
GroupNamingConvention
containsAnyGroup
in interface GroupNamingConvention
public String extractGroup(String encoded)
GroupNamingConvention
extractGroup
in interface GroupNamingConvention
Copyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.