Class FSHashSet<T extends TOP>

    • Field Detail

      • typeIndexID

        public static final int typeIndexID
      • type

        public static final int type
      • isPendingInit

        private boolean isPendingInit
        lifecycle - starts as empty array list - becomes non-empty when updated (add) -- used from that point on.
      • isSaveNeeded

        private boolean isSaveNeeded
      • fsHashSet

        private final java.util.HashSet<T extends TOP> fsHashSet
      • _FeatName_fsArray

        public static final java.lang.String _FeatName_fsArray
        See Also:
        Constant Field Values
      • _FC_fsArray

        private static final java.lang.invoke.CallSite _FC_fsArray
      • _FH_fsArray

        private static final java.lang.invoke.MethodHandle _FH_fsArray
    • Constructor Detail

      • FSHashSet

        protected FSHashSet()
        Never called. Disable default constructor
      • FSHashSet

        public FSHashSet​(TypeImpl type,
                         CASImpl casImpl)
        Internal - constructor used by generator
        Parameters:
        casImpl - the CAS this Feature Structure belongs to
        type - the type of this Feature Structure
      • FSHashSet

        public FSHashSet​(java.util.HashSet<T> set,
                         TypeImpl type,
                         CASImpl casImpl)
      • FSHashSet

        public FSHashSet​(JCas jcas)
        Parameters:
        jcas - JCas to which this Feature Structure belongs
      • FSHashSet

        public FSHashSet​(java.util.HashSet<T> set,
                         JCas jcas)
      • FSHashSet

        public FSHashSet​(JCas jcas,
                         int length)
        Make a new HashSet with an initial size .
        Parameters:
        jcas - The JCas
        length - initial size
      • FSHashSet

        public FSHashSet​(java.util.HashSet<T> set,
                         JCas jcas,
                         int length)
    • Method Detail

      • getTypeIndexID

        public int getTypeIndexID()
        Overrides:
        getTypeIndexID in class TOP
        Returns:
        index of the type
      • getFsArray

        private FSArray<T> getFsArray()
        getter for fsArray - gets internal use - holds the set of Feature Structures
        Returns:
        value of the feature
      • setFsArray

        private void setFsArray​(FSArray<T> v)
        setter for fsArray - sets internal use - holds the set of Feature Structures
        Parameters:
        v - value to set into the feature
      • maybeLazyInit

        private void maybeLazyInit()
      • lazyInit

        private void lazyInit()
      • _save_to_cas_data

        public void _save_to_cas_data()
        Description copied from interface: UimaSerializable
        This method is called by the framework before serialization of an instance of this JCas class. The implementation should save whatever data is needed into Features of this JCas class that can be serialized by UIMA.
        Specified by:
        _save_to_cas_data in interface UimaSerializable
      • gta

        private TOP[] gta()
      • equals

        public boolean equals​(java.lang.Object o)
        Description copied from interface: FeatureStructure
        A feature structure is equal to another feature structure iff it is identical in the underlying representation.
        Specified by:
        equals in interface java.util.Collection<T extends TOP>
        Specified by:
        equals in interface FeatureStructure
        Specified by:
        equals in interface java.util.Set<T extends TOP>
        Overrides:
        equals in class FeatureStructureImplC
      • hashCode

        public int hashCode()
        Description copied from interface: FeatureStructure
        Will return a hash code that's consistent with equality, i.e., if two FSs are equal, they will also return the same hash code.
        Specified by:
        hashCode in interface java.util.Collection<T extends TOP>
        Specified by:
        hashCode in interface FeatureStructure
        Specified by:
        hashCode in interface java.util.Set<T extends TOP>
        Overrides:
        hashCode in class FeatureStructureImplC
        Returns:
        The hash code.
      • toArray

        public T[] toArray()
        Specified by:
        toArray in interface java.util.Collection<T extends TOP>
        Specified by:
        toArray in interface java.util.Set<T extends TOP>
      • removeAll

        public boolean removeAll​(java.util.Collection<?> c)
        Specified by:
        removeAll in interface java.util.Collection<T extends TOP>
        Specified by:
        removeAll in interface java.util.Set<T extends TOP>
      • toArray

        public <N> N[] toArray​(N[] a)
        Specified by:
        toArray in interface java.util.Collection<T extends TOP>
        Specified by:
        toArray in interface java.util.Set<T extends TOP>
      • iterator

        public java.util.Iterator<T> iterator()
        Specified by:
        iterator in interface java.util.Collection<T extends TOP>
        Specified by:
        iterator in interface java.lang.Iterable<T extends TOP>
        Specified by:
        iterator in interface java.util.Set<T extends TOP>
      • gtaIterator

        private java.util.Iterator<T> gtaIterator()
        Returns:
        iterator over non-pear versions
      • size

        public int size()
        Size.
        Specified by:
        size in interface java.util.Collection<T extends TOP>
        Specified by:
        size in interface java.util.Set<T extends TOP>
        Returns:
        the int
        See Also:
        HashSet.size()
      • isEmpty

        public boolean isEmpty()
        Checks if is empty.
        Specified by:
        isEmpty in interface java.util.Collection<T extends TOP>
        Specified by:
        isEmpty in interface java.util.Set<T extends TOP>
        Returns:
        true, if is empty
        See Also:
        HashSet.isEmpty()
      • contains

        public boolean contains​(java.lang.Object o)
        Contains.
        Specified by:
        contains in interface java.util.Collection<T extends TOP>
        Specified by:
        contains in interface java.util.Set<T extends TOP>
        Parameters:
        o - the o
        Returns:
        true, if successful
        See Also:
        HashSet.contains(java.lang.Object)
      • add

        public boolean add​(T e)
        Adds the element to the set.
        Specified by:
        add in interface java.util.Collection<T extends TOP>
        Specified by:
        add in interface java.util.Set<T extends TOP>
        Parameters:
        e - the element to add
        Returns:
        true, if the set didn't already contain this element
        See Also:
        HashSet.add(java.lang.Object)
      • remove

        public boolean remove​(java.lang.Object o)
        Removes the element.
        Specified by:
        remove in interface java.util.Collection<T extends TOP>
        Specified by:
        remove in interface java.util.Set<T extends TOP>
        Parameters:
        o - the o
        Returns:
        true, if the set contained the element
        See Also:
        HashSet.remove(java.lang.Object)
      • clear

        public void clear()
        Clear.
        Specified by:
        clear in interface java.util.Collection<T extends TOP>
        Specified by:
        clear in interface java.util.Set<T extends TOP>
        See Also:
        HashSet.clear()
      • containsAll

        public boolean containsAll​(java.util.Collection<?> c)
        Contains all.
        Specified by:
        containsAll in interface java.util.Collection<T extends TOP>
        Specified by:
        containsAll in interface java.util.Set<T extends TOP>
        Parameters:
        c - the c
        Returns:
        true, if set contains all of the elements in c
        See Also:
        AbstractCollection.containsAll(java.util.Collection)
      • addAll

        public boolean addAll​(java.util.Collection<? extends T> c)
        Adds all the elements .
        Specified by:
        addAll in interface java.util.Collection<T extends TOP>
        Specified by:
        addAll in interface java.util.Set<T extends TOP>
        Parameters:
        c - the c
        Returns:
        true, if set changed
        See Also:
        AbstractCollection.addAll(java.util.Collection)
      • spliterator

        public java.util.Spliterator<T> spliterator()
        Spliterator.
        Specified by:
        spliterator in interface java.util.Collection<T extends TOP>
        Specified by:
        spliterator in interface java.lang.Iterable<T extends TOP>
        Specified by:
        spliterator in interface java.util.Set<T extends TOP>
        Returns:
        the spliterator
        See Also:
        HashSet.spliterator()
      • retainAll

        public boolean retainAll​(java.util.Collection<?> c)
        Retain all.
        Specified by:
        retainAll in interface java.util.Collection<T extends TOP>
        Specified by:
        retainAll in interface java.util.Set<T extends TOP>
        Parameters:
        c - the c
        Returns:
        true, if collection changed
        See Also:
        AbstractCollection.retainAll(java.util.Collection)
      • toString

        private java.lang.String toString​(java.util.Collection<?> collection,
                                          int maxLen)
        To string.
        Parameters:
        collection - the collection
        maxLen - the max len
        Returns:
        the string