public class FuzzyFieldContract extends AbstractFuzzyMember<Field>
| Modifier and Type | Class and Description |
|---|---|
static class |
FuzzyFieldContract.Builder
Represents a builder for a field matcher.
|
declaringMatcher, modifiersBanned, modifiersRequired, nameRegex, sealed| Modifier and Type | Method and Description |
|---|---|
protected int |
calculateRoundNumber()
Calculate the round number indicating when this matcher should be applied.
|
boolean |
equals(Object obj) |
protected Map<String,Object> |
getKeyValueView()
Generate a view of this matcher as a key-value map.
|
AbstractFuzzyMatcher<Class<?>> |
getTypeMatcher()
Retrieve the class matcher that matches the type of a field.
|
int |
hashCode() |
boolean |
isMatch(Field value,
Object parent)
Determine if the given value is a match.
|
static FuzzyFieldContract |
matchType(AbstractFuzzyMatcher<Class<?>> matcher)
Match a field by its type.
|
static FuzzyFieldContract.Builder |
newBuilder()
Return a new fuzzy field contract builder.
|
getDeclaringMatcher, getModifiersBanned, getModifiersRequired, getNameRegex, prepareBuild, toStringand, combineRounds, combineRounds, compareTo, getRoundNumber, inverted, orpublic static FuzzyFieldContract matchType(AbstractFuzzyMatcher<Class<?>> matcher)
matcher - - the type to match.public static FuzzyFieldContract.Builder newBuilder()
public AbstractFuzzyMatcher<Class<?>> getTypeMatcher()
public boolean isMatch(Field value, Object parent)
AbstractFuzzyMatcherisMatch in class AbstractFuzzyMember<Field>value - - the value to match.parent - - the parent container, or NULL if this value is the root.protected int calculateRoundNumber()
AbstractFuzzyMatcherMatchers with a lower round number are applied before matchers with a higher round number.
By convention, this round number should be negative, except for zero in the case of a matcher
that accepts any value. A good implementation should return the inverted tree depth (class hierachy)
of the least specified type used in the matching. Thus Integer will have a lower round number than
Number.
calculateRoundNumber in class AbstractFuzzyMember<Field>protected Map<String,Object> getKeyValueView()
AbstractFuzzyMember
Used by AbstractFuzzyMember.toString() to print a representation of this object.
getKeyValueView in class AbstractFuzzyMember<Field>public int hashCode()
hashCode in class AbstractFuzzyMember<Field>public boolean equals(Object obj)
equals in class AbstractFuzzyMember<Field>Copyright © 2012–2017 Comphenix and dmulloy2. Licensed under the GNU GPL v2.