Package com.adobe.xfa

Class SchemaPairs


  • public final class SchemaPairs
    extends java.lang.Object
    This class is used to store schema relationships. It stores an array of schema tags along with either a corresponding array of either ChildReln or an Attribute.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object get​(int eTag)
      Gets the value for a specific key (tag)
      int key​(int index)
      Returns the key (tag) at this position in the list.
      void put​(int eTag, java.lang.Object schema)
      Adds a schema pair to the list.
      int size()
      Returns the size of the list.
      java.lang.Object value​(int index)
      Returns the schema object at this position in the list
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SchemaPairs

        public SchemaPairs​(SchemaPairs other)
      • SchemaPairs

        public SchemaPairs()
    • Method Detail

      • get

        public java.lang.Object get​(int eTag)
        Gets the value for a specific key (tag)
        Parameters:
        eTag - the tag to search for
        Returns:
        the Schema object corresponding to the tag. null if not found.
      • key

        public int key​(int index)
        Returns the key (tag) at this position in the list.
        Parameters:
        index - the position in the list
        Returns:
        the tag number
      • put

        public void put​(int eTag,
                        java.lang.Object schema)
        Adds a schema pair to the list. We first check if the value exists and if it does we replace the existing value. We sort the internal list by tag number.
        Parameters:
        eTag - the tag of the schema element we're adding
        schema - the schema object - Normally a ChildReln or an Attribute
      • size

        public int size()
        Returns the size of the list.
        Returns:
        the list size.
      • value

        public java.lang.Object value​(int index)
        Returns the schema object at this position in the list
        Parameters:
        index - the position in the list
        Returns:
        the schema object