code: public Iterator<MtasToken> iterator() throws MtasParserException {
      checkTokenCollectionIndex();
      return new Iterator<MtasToken>() {
  
        private Iterator<Integer> indexIterator = tokenCollectionIndex.iterator();
  
        @Override
        public boolean hasNext() {
          return indexIterator.hasNext();
        }
  
        @Override
        public MtasToken next() {
          return tokenCollection.get(indexIterator.next());
        }
  
        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
docs: Iterator.
  
  @return the iterator
  @throws MtasParserException the mtas parser exception