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
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private int
     
    private int[]
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(int tag)
    Adds a tag to the list.
    void
    Clears the tags from the list.
    boolean
    contains(int tag)
    Checks if a tag is present.
    int
    Gets the first tag in the list.
    boolean
    Checks whether the tag list is empty.
    int
    Gets the number of tags available.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • _tags

      private int[] _tags
    • _tagCount

      private int _tagCount
  • 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.