Sets key obtention iterations.

@param iter the iter
500107
public void setKeyObtentionIterations(final String iter) {
        if (StringUtils.isNotBlank(iter) && NumberUtils.isCreatable(iter)) {
            LOGGER.debug("Configured Jasypt iterations");
            jasyptInstance.setKeyObtentionIterations(Integer.parseInt(iter));
        }
    }
905350
public void setSentenceIterator(@NonNull SentenceIterator iterator) {
        //if (tokenizerFactory == null) throw new IllegalStateException("Please call setTokenizerFactory() prior to setSentenceIter() call.");

        if (tokenizerFactory != null) {
            SentenceTransformer transformer = new SentenceTransformer.Builder().iterator(iterator)
                            .tokenizerFactory(tokenizerFactory)
                            .allowMultithreading(configuration == null || configuration.isAllowParallelTokenization())
                            .build();
            this.iterator = new AbstractSequenceIterator.Builder<>(transformer).build();
        } else
            log.error("Please call setTokenizerFactory() prior to setSentenceIter() call.");
    }
266714
public void setChangedNodes( Set<NodeKey> keys ) {
        if (keys != null) {
            this.nodeKeys = Collections.unmodifiableSet(new HashSet<NodeKey>(keys));
        }
    }
1189553
@Override
  public Iterator<Entry<K,V>> iterator() {
    checkClosed();
    final Iterator<K> _keyIterator = cache.keys().iterator();
    return new Iterator<Entry<K, V>>() {

      CacheEntry<K, V> entry;

      @Override
      public boolean hasNext() {
        while(_keyIterator.hasNext()) {
          entry = cache.getEntry(_keyIterator.next());
          if (entry.getException() == null) {
            return true;
          }
        }
        entry = null;
        return false;
      }

      @Override
      public Entry<K, V> next() {
        if (entry == null && !hasNext()) {
          throw new NoSuchElementException();
        }
        return new Entry<K, V>() {
          @Override
          public K getKey() {
            return entry.getKey();
          }

          @Override
          public V getValue() {
            return entry.getValue();
          }

          @SuppressWarnings("unchecked")
          @Override
          public <T> T unwrap(Class<T> _class) {
            if (CacheEntry.class.equals(_class)) {
              return (T) entry;
            }
            return null;
          }
        };
      }

      @Override
      public void remove() {
        if (entry == null) {
          throw new IllegalStateException("hasNext() / next() not called or end of iteration reached");
        }
        cache.remove(entry.getKey());
      }
    };
  }
924030
public void setProperties(Object bean, Map map) {
        checkInitalised();
        for (Iterator iter = map.entrySet().iterator(); iter.hasNext();) {
            Map.Entry entry = (Map.Entry) iter.next();
            String key = entry.getKey().toString();

            Object value = entry.getValue();
            setProperty(bean, key, value);
        }
    }
218170
protected function _setIterator($iterator)
    {
        if ($iterator !== null && !($iterator instanceof IteratorInterface)) {
            throw $this->_createInvalidArgumentException(
                $this->__('Argument is not an iterator instance'),
                null,
                null,
                $iterator
            );
        }

        $this->iterator = $iterator;
    }
23205
def _iter_keys(key):
    
    for i in range(winreg.QueryInfoKey(key)[0]):
        yield winreg.OpenKey(key, winreg.EnumKey(key, i))
520153
public Iterator<K> keys(Iterator<K> oldIter)
  {
    KeyIterator<K,V> iter = (KeyIterator<K,V>) oldIter;

    iter.init(this);

    return oldIter;
  }
475146
private Iterator<String> decodeKeys(final Iterator<Row<ByteBuffer, DeltaKey>> iter) {
        return new AbstractIterator<String>() {
            @Override
            protected String computeNext() {
                while (iter.hasNext()) {
                    Row<ByteBuffer, DeltaKey> row = iter.next();
                    if (!row.getColumns().isEmpty()) { // Ignore range ghosts
                        return AstyanaxStorage.getContentKey(row.getRawKey());
                    }
                }
                return endOfData();
            }
        };
    }
132719
@SuppressWarnings({"unchecked","rawtypes"})
	public static void setProps(Properties prop) {
		properties = prop;
		
		Iterator propIt = properties.entrySet().iterator();
		while(propIt.hasNext()) {
			Entry<String, String> entry = (Entry<String, String>) propIt.next();
			
			properties.setProperty(entry.getKey(), entry.getValue().trim());
		}
	}
1158326
public Iterator<K> keys()
  {
    KeyIterator<K,V> iter = new KeyIterator<K,V>(this);

    iter.init(this);

    return iter;
  }
395997
public void setIterator(Resource resource, Resource.Iterator iterator) {
		iteratorMap.put(resource, iterator);
	}
315591
function eachFrom(keys, key, iter) {
  var i = keys.indexOf(key)
  if(!~i) return
  //start at 1 because we want to visit all keys but key.
  for(var j = 1; j < keys.length; j++)
    if(iter(keys[(j+i)%keys.length], j))
      return
}
989143
public void storeKeys(Iterator<K> iterator) {
        long startedNanos = System.nanoTime();
        FileOutputStream fos = null;
        try {
            buf = allocate(BUFFER_SIZE);
            lastWrittenBytes = 0;
            lastKeyCount = 0;

            fos = new FileOutputStream(tmpStoreFile, false);

            // write header and keys
            writeInt(fos, MAGIC_BYTES);
            writeInt(fos, FileFormat.INTERLEAVED_LENGTH_FIELD.ordinal());
            writeKeySet(fos, fos.getChannel(), iterator);

            // cleanup if no keys have been written
            if (lastKeyCount == 0) {
                deleteQuietly(storeFile);
                updatePersistenceStats(startedNanos);
                return;
            }

            fos.flush();
            closeResource(fos);
            rename(tmpStoreFile, storeFile);

            updatePersistenceStats(startedNanos);
        } catch (Exception e) {
            logger.warning(format("Could not store keys of Near Cache %s (%s)", nearCacheName, storeFile.getAbsolutePath()), e);

            nearCacheStats.addPersistenceFailure(e);
        } finally {
            closeResource(fos);
            deleteQuietly(tmpStoreFile);
        }
    }
223811
@Override
    public void reset() {
        if (!iter.resetSupported()) {
            throw new IllegalStateException(
                            "Cannot reset MultipleEpochsIterator with base iter that does not support reset");
        }
        epochs = 0;
        lastBatch = batch;
        batch = 0;
        iterationsCounter.set(0);
        iter.reset();
    }
654210
public void setAll(double value) {
        MatrixIterator it = iterator();

        while (it.hasNext()) {
            it.next();
            it.set(value);
        }
    }
392009
function each(obj, iter) {
  for (var key in obj) {
    if (obj.hasOwnProperty(key)) iter(key, obj[key]);
  }
}