public enum MatchStrength extends Enum<MatchStrength>
Enum Constant and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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.
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 nameNullPointerException
- if the argument is null