public static class JarBuilder.DuplicatePolicy extends Object implements Predicate<CharSequence>
| Constructor and Description |
|---|
JarBuilder.DuplicatePolicy(Predicate<CharSequence> selector,
JarBuilder.DuplicateAction action)
Creates a policy that will be applied to duplicate entries matching the given
selector. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
apply(CharSequence jarPath) |
JarBuilder.DuplicateAction |
getAction()
Returns the action that should be applied when a duplicate entry falls under this policy's
jurisdiction.
|
static JarBuilder.DuplicatePolicy |
pathMatches(String regex,
JarBuilder.DuplicateAction action)
Creates a policy that applies to entries based on a path match.
|
String |
toString() |
public JarBuilder.DuplicatePolicy(Predicate<CharSequence> selector, JarBuilder.DuplicateAction action)
selector.selector - A predicate that selects entries this policy has jurisdiction over.action - The action to apply to entries selected by this policy.public static JarBuilder.DuplicatePolicy pathMatches(String regex, JarBuilder.DuplicateAction action)
regex - A regular expression to match entry paths against.action - The action to apply to duplicate entries with path matching regex.public JarBuilder.DuplicateAction getAction()
public boolean apply(CharSequence jarPath)
apply in interface Predicate<CharSequence>