|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | »ý¼ºÀÚ | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
public interface Iterator<E>
Ä÷º¼ÇÀÇ ¹Ýº¹ÀÚÀÔ´Ï´Ù. ¹Ýº¹ÀÚ´Â Java Collections Framework¿¡ ´ëÇØ Enumeration ´ë½ÅÀÌ µË´Ï´Ù. ¹Ýº¹ÀÚ´Â ¾Æ·¡ÀÇ 2°³ÀÇ Á¡À¸·Î½á ¿°Å¿Í ´Ù¸¨´Ï´Ù.
ÀÌ ÀÎÅÍÆäÀ̽º´Â Java Collections Framework ¸â¹öÀÔ´Ï´Ù.
Collection
,
ListIterator
,
Enumeration
¸Þ¼µå °³¿ä | |
---|---|
boolean |
hasNext ()
¹Ýº¹ 󸮷Π¶ÇÇÑ ¿ä¼Ò°¡ ÀÖ´Â °æ¿ì¿¡ true¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
E |
next ()
¹Ýº¹ 󸮷Π´ÙÀ½ÀÇ ¿ä¼Ò¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
void |
remove ()
±âº»À¸·Î µÇ´Â Ä÷º¼ÇÀ¸·ÎºÎÅÍ, ¹Ýº¹ÀÚ¿¡ ÀÇÇØ ¸¶Áö¸·¿¡ ¸®ÅÏµÈ ¿ä¼Ò¸¦ »èÁ¦ÇÕ´Ï´Ù (ÀÓÀÇÀÇ ¿ÀÆÛ·¹À̼Ç). |
¸Þ¼µåÀÇ »ó¼¼ |
---|
boolean hasNext()
E next()
hasNext()
¸Þ¼µå°¡ false¸¦ µ¹·ÁÁÙ ¶§±îÁö ÀÌ ¸Þ¼µå¸¦ ¹Ýº¹ÇØ È£ÃâÇϸé, ±âº»À¸·Î µÇ´Â Ä÷º¼Ç³»ÀÇ °¢ ¿ä¼Ò°¡ ÇÑ ¹ø¸¸ ¸®Åϵ˴ϴÙ
.
NoSuchElementException
- ¹Ýº¹ 󸮷Π±× ÀÌ»ó ¿ä¼Ò°¡ ¾ø´Â °æ¿ìvoid remove()
UnsupportedOperationException
- Iterator°¡ remove ¿ÀÆÛ·¹À̼ÇÀ» Áö¿ø
ÇÏÁö ¾Ê´Â °æ¿ì
IllegalStateException
- next ¸Þ¼µå°¡ ¾ÆÁ÷ ºÒ·Á°¡
Áö ¾ÊÀºÁö, next ¸Þ¼µåÀÇ ¸¶Áö¸· È£ÃâÀÇ ÈÄ¿¡ remove ¸Þ¼µå°¡ À̹Ì
ºÒ·Á°¡
°í ÀÖ´Â °æ¿ì
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | »ý¼ºÀÚ | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.