class ClosestScore extends BaseScore
| Constructor and Description |
|---|
ClosestScore() |
| Modifier and Type | Method and Description |
|---|---|
protected int |
getInitialScore(Match match,
Signature signature,
int lastNodeCharacter)
Calculate the initial score based on the difference in length of the
right most node and the target user agent.
|
private static boolean |
getIsNumeric(byte value) |
private static int |
getNumber(byte[] array,
int start,
int length)
Returns an integer representation of the characters between start and
end.
|
protected int |
getScore(Match match,
Node node)
Returns the difference score between the node and the target user agent
working from right to left.
|
evaluateSignaturesprotected int getInitialScore(Match match, Signature signature, int lastNodeCharacter) throws IOException
getInitialScore in class BaseScoreIOExceptionprotected int getScore(Match match, Node node) throws IOException
getScore in class BaseScorematch - node - IOExceptionprivate static boolean getIsNumeric(byte value)
private static int getNumber(byte[] array,
int start,
int length)
array - Array of characters with numeric characters present between
start and endstart - The first character to use to convert to a numberend - The last character to use to convert to a number