Class CBORParser.TagList

java.lang.Object
com.fasterxml.jackson.dataformat.cbor.CBORParser.TagList
Enclosing class:
CBORParser

public static final class CBORParser.TagList extends Object
Class for keeping track of tags in an optimized manner.
Since:
2.15
  • Constructor Details

    • TagList

      public TagList()
  • Method Details

    • size

      public int size()
      Gets the number of tags available.
      Returns:
      The number of tags.
    • isEmpty

      public boolean isEmpty()
      Checks whether the tag list is empty.
      Returns:
      true if there are no tags, false if there are tags..
    • clear

      public void clear()
      Clears the tags from the list.
    • add

      public void add(int tag)
      Adds a tag to the list.
      Parameters:
      tag - The tag to add.
    • contains

      public boolean contains(int tag)
      Checks if a tag is present.
      Parameters:
      tag - The tag to check.
      Returns:
      true if the tag is present, false if it is not.
    • getFirstTag

      public int getFirstTag()
      Gets the first tag in the list. This is primarily to support the legacy API.
      Returns:
      The first tag or -1 if there are no tags.