Class AiExcludesEntry
java.lang.Object
tools.pantheum.gaia.gs1.registry.AiExcludesEntry
Represents one entry in an AI's excludes list: either an exact AI code or
a start–end range.
None of the AI codes matched by an AiExcludesEntry may be present
in the same element string as the AI that declares it.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the exact AI.Returns the range end.Returns the range start.booleanisExact()Returnstrueif this element is exact.booleanisRange()Returnstrueif this element is range.booleanReturnstrueif the given AI code is matched by this entry — either an exact match or within the range.static AiExcludesEntryOf exact.static AiExcludesEntryOf range.toString()
-
Method Details
-
ofExact
Of exact.- Parameters:
ai- the AI- Returns:
- a new
AiExcludesEntry
-
ofRange
Of range.- Parameters:
start- the startend- the end- Returns:
- a new
AiExcludesEntry
-
isRange
public boolean isRange()Returnstrueif this element is range.- Returns:
trueif this element is range.
-
isExact
public boolean isExact()Returnstrueif this element is exact.- Returns:
trueif this element is exact.
-
getExactAi
-
getRangeStart
-
getRangeEnd
-
matches
Returnstrueif the given AI code is matched by this entry — either an exact match or within the range.- Parameters:
ai- the AI- Returns:
trueif matches.
-
toString
-