站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss RULES 3.0.6 API 英文版文档

EmptyMapIterator - JBoss RULES 3.0.6 API 英文版文档


org.drools.util
Class EmptyMapIterator

java.lang.Object
  extended by org.drools.util.EmptyMapIterator
All Implemented Interfaces:
java.util.Iterator, MapIterator

public class EmptyMapIterator
extends java.lang.Object
implements MapIterator

Provides an implementation of an empty map iterator.

Since:
Commons Collections 3.1

Field Summary
static MapIterator INSTANCE
          Singleton instance of the iterator.
 
Constructor Summary
protected EmptyMapIterator()
          Constructor.
 
Method Summary
 void add(java.lang.Object obj)
           
 java.lang.Object getKey()
          Gets the current key, which is the key returned by the last call to next().
 java.lang.Object getValue()
          Gets the current value, which is the value associated with the last key returned by next().
 boolean hasNext()
          Checks to see if there are more entries still to be iterated.
 boolean hasPrevious()
           
 java.lang.Object next()
          Gets the next key from the Map.
 int nextIndex()
           
 java.lang.Object previous()
           
 int previousIndex()
           
 void remove()
          Removes the last returned key from the underlying Map (optional operation).
 void reset()
           
 void set(java.lang.Object obj)
           
 java.lang.Object setValue(java.lang.Object value)
          Sets the value associated with the current key (optional operation).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final MapIterator INSTANCE
Singleton instance of the iterator.

Since:
Commons Collections 3.1
Constructor Detail

EmptyMapIterator

protected EmptyMapIterator()
Constructor.

Method Detail

hasNext

public boolean hasNext()
Description copied from interface: MapIterator
Checks to see if there are more entries still to be iterated.

Specified by:
hasNext in interface java.util.Iterator
Specified by:
hasNext in interface MapIterator
Returns:
true if the iterator has more elements

next

public java.lang.Object next()
Description copied from interface: MapIterator
Gets the next key from the Map.

Specified by:
next in interface java.util.Iterator
Specified by:
next in interface MapIterator
Returns:
the next key in the iteration

hasPrevious

public boolean hasPrevious()

previous

public java.lang.Object previous()

nextIndex

public int nextIndex()

previousIndex

public int previousIndex()

add

public void add(java.lang.Object obj)

set

public void set(java.lang.Object obj)

remove

public void remove()
Description copied from interface: MapIterator
Removes the last returned key from the underlying Map (optional operation).

This method can be called once per call to next().

Specified by:
remove in interface java.util.Iterator
Specified by:
remove in interface MapIterator

getKey

public java.lang.Object getKey()
Description copied from interface: MapIterator
Gets the current key, which is the key returned by the last call to next().

Specified by:
getKey in interface MapIterator
Returns:
the current key

getValue

public java.lang.Object getValue()
Description copied from interface: MapIterator
Gets the current value, which is the value associated with the last key returned by next().

Specified by:
getValue in interface MapIterator
Returns:
the current value

setValue

public java.lang.Object setValue(java.lang.Object value)
Description copied from interface: MapIterator
Sets the value associated with the current key (optional operation).

Specified by:
setValue in interface MapIterator
Parameters:
value - the new value
Returns:
the previous value

reset

public void reset()