public Set<T> noFollow(T elem) {
	   Set<T> noFollowSet = new HashSet<T>();
	   ListIterator<T> rulesIter = rules.listIterator();

	   while (rulesIter.hasNext()) {
		   T next = rulesIter.next();
		   if (next != null && next.equals(elem) && rulesIter.hasNext())
	    	  noFollowSet.add(rulesIter.next());
	   } 
	   
	   if (noFollowSet.isEmpty())
		   return Collections.emptySet();
	   return noFollowSet;
	}