|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<MatchStrength> com.fasterxml.jackson.core.format.MatchStrength
public enum MatchStrength
Enumeration used to indicate strength of match between data format and piece of data (typically beginning of a data file). Values are in increasing match strength; and detectors should return "strongest" value: that is, it should start with strongest match criteria, and downgrading if criteria is not fulfilled.
Enum Constant Summary | |
---|---|
FULL_MATCH
Value that indicates that given data contains a signature that is deemed specific enough to uniquely indicate data format used. |
|
INCONCLUSIVE
Value that indicates that detector can not find out whether could be a match or not. |
|
NO_MATCH
Value that indicates that given data can not be in given format. |
|
SOLID_MATCH
Value that indicates that given data conforms to (one of) canonical form(s) of the data format. |
|
WEAK_MATCH
Value that indicates that given data could be of specified format (i.e. |
Method Summary | |
---|---|
static MatchStrength |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static MatchStrength[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final MatchStrength NO_MATCH
public static final MatchStrength INCONCLUSIVE
public static final MatchStrength WEAK_MATCH
public static final MatchStrength SOLID_MATCH
For example, when testing for XML data format,
seeing a less-than character ("<") alone (with possible leading spaces)
would be a strong indication that data could
be in xml format (but see below for FULL_MATCH
description for more)
public static final MatchStrength FULL_MATCH
For example, when testing for XML data format,
seing "<xml" as the first data bytes ("XML declaration", as per XML specification)
could give full confidence that data is indeed in XML format.
Not all data formats have unique leading identifiers to allow full matches; for example,
JSON only has heuristic matches and can have at most SOLID_MATCH
) match.
Method Detail |
---|
public static MatchStrength[] values()
for (MatchStrength c : MatchStrength.values()) System.out.println(c);
public static MatchStrength valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |