Ngram implements Bigram<T>, Trigram<T>,
    Comparable<Ngram<T>>,
    Serializable { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Ngram<?> ngram = (Ngram<?>) o; if (length != ngram.length) { return false; } for (int i = 0; i < length; i++) { if (!atIndex(i).equals(ngram.atIndex(i))) { return false; } } return true; } Ngram(T[] backingArray, int length, int offset); static Ngram<S> create(S first, S second); static Ngram<S> create(S first, S second,
      S third); static Ngram<S> bigram(S[] array, int index); static Ngram<S> trigram(S[] array, int index); @Override Ngram<T> tail(); @Override Ngram<T> head(); @Override T getFirst(); @Override T getSecond(); @Override T getThird(); @Override int compareTo(Ngram<T> o); @Override Iterator<T> iterator(); @Override boolean equals(@Nullable Object o); @Override int hashCode(); @Override String toString();  }
@Test void testEqualsNull() { assertFalse(arrayTri.equals(null), "Object should not equal null."); }
@Test void testEquals() { assertEquals(arrayTri, Ngram.create("c", "d", "e"), "Ngram should be equal to ngram with same values"); }