java.lang.Object
es.uam.eps.ir.relison.content.index.structure.Posting
es.uam.eps.ir.relison.content.index.structure.positional.PositionalPosting
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Posting>, java.lang.Iterable<java.lang.Integer>

public class PositionalPosting
extends Posting
implements java.lang.Iterable<java.lang.Integer>
Positional posting implementation.
See Also:
Serialized Form
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected java.util.List<java.lang.Integer> positions
    List of positions.
  • Constructor Summary

    Constructors 
    Constructor Description
    PositionalPosting​(int id, long f, java.util.List<java.lang.Integer> pos)
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    java.util.List<java.lang.Integer> getPositions()
    Obtains the position list.
    java.util.Iterator<java.lang.Integer> iterator()
    Obtains an iterator over the positions.

    Methods inherited from class es.uam.eps.ir.relison.content.index.structure.Posting

    compareTo, getDocID, getFreq

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Field Details

    • positions

      protected java.util.List<java.lang.Integer> positions
      List of positions.
  • Constructor Details

    • PositionalPosting

      public PositionalPosting​(int id, long f, java.util.List<java.lang.Integer> pos)
      Constructor.
      Parameters:
      id - identifier of the document.
      f - frequency of appearance.
      pos - position list.
  • Method Details

    • iterator

      public java.util.Iterator<java.lang.Integer> iterator()
      Obtains an iterator over the positions.
      Specified by:
      iterator in interface java.lang.Iterable<java.lang.Integer>
      Returns:
      the iterator.
    • getPositions

      public java.util.List<java.lang.Integer> getPositions()
      Obtains the position list.
      Returns:
      the position list.