org.truth0.subjects
Class ListSubject<S extends ListSubject<S,T,C>,T,C extends List<T>>
java.lang.Object
org.truth0.subjects.Subject<S,C>
org.truth0.subjects.IterableSubject<S,T,C>
org.truth0.subjects.CollectionSubject<S,T,C>
org.truth0.subjects.ListSubject<S,T,C>
@GwtCompatible
public class ListSubject<S extends ListSubject<S,T,C>,T,C extends List<T>>
- extends CollectionSubject<S,T,C>
|
Method Summary |
void |
containsSequence(List<?> sequence)
Attests that a List contains the specified sequence. |
static
|
create(FailureStrategy failureStrategy,
List<T> list)
|
void |
isOrdered()
Attests that a List is strictly ordered according to the natural ordering of its elements. |
void |
isOrdered(Comparator<T> comparator)
Attests that a List is strictly ordered according to the given comparator. |
void |
isPartiallyOrdered()
Attests that a List is partially ordered according to the natural ordering of its elements. |
void |
isPartiallyOrdered(Comparator<T> comparator)
Attests that a List is partially ordered according to the given comparator. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ListSubject
protected ListSubject(FailureStrategy failureStrategy,
C list)
create
public static <T,C extends List<T>> ListSubject<? extends ListSubject<?,T,C>,T,C> create(FailureStrategy failureStrategy,
List<T> list)
containsSequence
public void containsSequence(List<?> sequence)
- Attests that a List contains the specified sequence.
isOrdered
public void isOrdered()
- Attests that a List is strictly ordered according to the natural ordering of its elements.
Null elements are not permitted.
- Throws:
ClassCastException - if any pair of elements is not mutually Comparable.
NullPointerException - if any element is null.
isPartiallyOrdered
public void isPartiallyOrdered()
- Attests that a List is partially ordered according to the natural ordering of its elements.
Null elements are not permitted.
- Throws:
ClassCastException - if any pair of elements is not mutually Comparable.
NullPointerException - if any element is null.
isOrdered
public void isOrdered(Comparator<T> comparator)
- Attests that a List is strictly ordered according to the given comparator.
Null elements are not permitted.
- Throws:
ClassCastException - if any pair of elements is not mutually Comparable.
NullPointerException - if any element is null.
isPartiallyOrdered
public void isPartiallyOrdered(Comparator<T> comparator)
- Attests that a List is partially ordered according to the given comparator.
Null elements are not permitted.
- Throws:
ClassCastException - if any pair of elements is not mutually Comparable.
NullPointerException - if any element is null.
Copyright © 2013. All Rights Reserved.