Sequence.java

  1. /*
  2.  * Copyright (C) 2010, Google Inc.
  3.  * Copyright (C) 2008-2009, Johannes E. Schindelin <johannes.schindelin@gmx.de> and others
  4.  *
  5.  * This program and the accompanying materials are made available under the
  6.  * terms of the Eclipse Distribution License v. 1.0 which is available at
  7.  * https://www.eclipse.org/org/documents/edl-v10.php.
  8.  *
  9.  * SPDX-License-Identifier: BSD-3-Clause
  10.  */

  11. package org.eclipse.jgit.diff;

  12. /**
  13.  * Arbitrary sequence of elements.
  14.  * <p>
  15.  * A sequence of elements is defined to contain elements in the index range
  16.  * <code>[0, {@link #size()})</code>, like a standard Java List implementation.
  17.  * Unlike a List, the members of the sequence are not directly obtainable.
  18.  * <p>
  19.  * Implementations of Sequence are primarily intended for use in content
  20.  * difference detection algorithms, to produce an
  21.  * {@link org.eclipse.jgit.diff.EditList} of {@link org.eclipse.jgit.diff.Edit}
  22.  * instances describing how two Sequence instances differ.
  23.  * <p>
  24.  * To be compared against another Sequence of the same type, a supporting
  25.  * {@link org.eclipse.jgit.diff.SequenceComparator} must also be supplied.
  26.  */
  27. public abstract class Sequence {
  28.     /** @return total number of items in the sequence. */
  29.     /**
  30.      * Get size
  31.      *
  32.      * @return size
  33.      */
  34.     public abstract int size();
  35. }