Class ListSubject<S extends ListSubject<S,​T,​C>,​T,​C extends java.util.List<T>>


  • public class ListSubject<S extends ListSubject<S,​T,​C>,​T,​C extends java.util.List<T>>
    extends CollectionSubject<S,​T,​C>
    Propositions for List subjects.
    • Method Detail

      • containsSequence

        public void containsSequence​(java.util.List<?> sequence)
        Fails if the list does not contain the specified sequence.
      • isOrdered

        public void isOrdered()
        Fails if the list is not strictly ordered according to the natural ordering of its elements. Null elements are not permitted.
        Throws:
        java.lang.ClassCastException - if any pair of elements is not mutually Comparable.
        java.lang.NullPointerException - if any element is null.
      • isPartiallyOrdered

        public void isPartiallyOrdered()
        Fails if the list is not partially ordered according to the natural ordering of its elements. Null elements are not permitted.
        Throws:
        java.lang.ClassCastException - if any pair of elements is not mutually Comparable.
        java.lang.NullPointerException - if any element is null.
      • isOrdered

        public void isOrdered​(java.util.Comparator<T> comparator)
        Fails if the list is not strictly ordered according to the given comparator. Null elements are not permitted.
        Throws:
        java.lang.ClassCastException - if any pair of elements is not mutually Comparable.
        java.lang.NullPointerException - if any element is null.
      • isPartiallyOrdered

        public void isPartiallyOrdered​(java.util.Comparator<T> comparator)
        Fails if the list is not partially ordered according to the given comparator. Null elements are not permitted.
        Throws:
        java.lang.ClassCastException - if any pair of elements is not mutually Comparable.
        java.lang.NullPointerException - if any element is null.