public class ParseField
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ParseField.CommonFields |
Constructor and Description |
---|
ParseField(java.lang.String name,
java.lang.String... deprecatedNames) |
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
getAllNamesIncludedDeprecated() |
java.lang.String |
getAllReplacedWith() |
java.lang.String[] |
getDeprecatedNames() |
java.lang.String |
getPreferredName() |
boolean |
match(java.lang.String fieldName) |
java.lang.String |
toString() |
ParseField |
withAllDeprecated(java.lang.String allReplacedWith)
Return a new ParseField where all field names are deprecated and replaced
with
allReplacedWith . |
ParseField |
withDeprecation(java.lang.String... deprecatedNames) |
public ParseField(java.lang.String name, java.lang.String... deprecatedNames)
name
- the primary name for this field. This will be returned by
getPreferredName()
deprecatedNames
- names for this field which are deprecated and will not be
accepted when strict matching is used.public java.lang.String getPreferredName()
public java.lang.String[] getAllNamesIncludedDeprecated()
public ParseField withDeprecation(java.lang.String... deprecatedNames)
deprecatedNames
- deprecated names to include with the returned
ParseField
ParseField
using the preferred name from this one
but with the specified deprecated namespublic ParseField withAllDeprecated(java.lang.String allReplacedWith)
allReplacedWith
.public boolean match(java.lang.String fieldName)
fieldName
- the field name to match against this ParseField
fieldName
matches any of the acceptable
names for this ParseField
.public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getAllReplacedWith()
ParseField
has been entirely
deprecated in favor of something else. This method will return
null
if the ParseField has not been completely
deprecated.public java.lang.String[] getDeprecatedNames()
ParseField
which are
deprecated.