package com.jexpect;

class IterableMatcher<T> {

  private final Iterable<T> iterable;

  IterableMatcher(Iterable<T> iterable) {
    this.iterable = iterable;
  }

  boolean isEmpty() {
    return iterable == null || !iterable.iterator().hasNext();
  }

  boolean isNotEmpty() {
    return !isEmpty();
  }

  boolean containsNot(T expected) {
    return !contains(expected);
  }

  boolean contains(T expected) {
    if (iterable != null) {
      for (T item : iterable) {
        if (item.equals(expected)) {
          return true;
        }
      }
    }
    return false;
  }
}

@@ -326,24 +326,20 @@
 nsNot(T 
-expected
+item
 ) %7B%0A    
@@ -355,24 +355,20 @@
 ontains(
-expected
+item
 );%0A  %7D%0A%0A
@@ -388,24 +388,20 @@
 tains(T 
-expected
+item
 ) %7B%0A    
@@ -437,20 +437,17 @@
  for (T 
-item
+t
  : itera
@@ -469,20 +469,17 @@
 if (
-item
+t
 .equals(
 expe
@@ -478,16 +478,12 @@
 als(
-expected
+item
 )) %7B

rename variables