-
Recently Browsing
No registered users viewing this page.
-
Posts
-
but eclipse say i have to set the cast
-
By diesieben07 · Posted
Sure. Although you should not need that cast. Actually. I looked again. No, that does not make sense. Why are you trying to cast the iterator. -
than this while (enchantmentIterator.hasNext()) { Enchantment enchantment = (Enchantment) enchantmentIterator; if (!enchantment.isCompatibleWith(enchantmentIterator.next())) { enchantmentIterator.remove(); } }
-
By diesieben07 · Posted
By calling remove on the iterator you remove the current element from the collection you are iterating. -
while (enchantmentIterator.hasNext()) { Enchantment enchantment = (Enchantment) enchantmentIterator.next(); if (!enchantment.isCompatibleWith((Enchantment) enchantmentIterator)) { enchantmentIterator.remove(); } } so is this correct? and how to remove now the level of the enchantment?
-
-
Topics
-
Who's Online (See full list)