Class TermFrequencyAttributeImpl

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int termFrequency  
    • Constructor Summary

      Constructors 
      Constructor Description
      TermFrequencyAttributeImpl()
      Initialize this attribute with term frequency of 1
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()
      Clears the values in this AttributeImpl and resets it to its default value.
      void copyTo​(AttributeImpl target)
      Copies the values from this Attribute into the passed-in target attribute.
      void end()
      Clears the values in this AttributeImpl and resets it to its value at the end of the field.
      boolean equals​(java.lang.Object other)  
      int getTermFrequency()
      Returns the custom term frequency.
      int hashCode()  
      void reflectWith​(AttributeReflector reflector)
      This method is for introspection of attributes, it should simply add the key/values this attribute holds to the given AttributeReflector.
      void setTermFrequency​(int termFrequency)
      Set the custom term frequency of the current term within one document.
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • termFrequency

        private int termFrequency
    • Constructor Detail

      • TermFrequencyAttributeImpl

        public TermFrequencyAttributeImpl()
        Initialize this attribute with term frequency of 1
    • Method Detail

      • clear

        public void clear()
        Description copied from class: AttributeImpl
        Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.
        Specified by:
        clear in class AttributeImpl
      • end

        public void end()
        Description copied from class: AttributeImpl
        Clears the values in this AttributeImpl and resets it to its value at the end of the field. If this implementation implements more than one Attribute interface it clears all.

        The default implementation simply calls AttributeImpl.clear()

        Overrides:
        end in class AttributeImpl
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • copyTo

        public void copyTo​(AttributeImpl target)
        Description copied from class: AttributeImpl
        Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.
        Specified by:
        copyTo in class AttributeImpl