Skip to content

TokenComparison

An enum-like class that represents the result of comparing two Tokens.

The return type of Token.compareStrings.

Constants

Name Type Description
BOTH_UNRESOLVED TokenComparison This means both components are Tokens.
DIFFERENT TokenComparison This means we're certain the two components are NOT Tokens, and different.
ONE_UNRESOLVED TokenComparison This means exactly one of the components is a Token.
SAME TokenComparison This means we're certain the two components are NOT Tokens, and identical.

BOTH_UNRESOLVEDRequired

public TokenComparison getBothUnresolved();

This means both components are Tokens.


DIFFERENTRequired

public TokenComparison getDifferent();

This means we're certain the two components are NOT Tokens, and different.


ONE_UNRESOLVEDRequired

public TokenComparison getOneUnresolved();

This means exactly one of the components is a Token.


SAMERequired

public TokenComparison getSame();

This means we're certain the two components are NOT Tokens, and identical.