lojix/power_model/src/main/com/thesett/aima/attribute/impl/IntRangeType.java
public Iterator<Integer> getAllPossibleValuesIterator() throws InfiniteValuesException
    {
        return new Iterator<Integer>()
            {
                int current = minValue;

                /** {@inheritDoc} */
                public boolean hasNext()
                {
                    return current <= maxValue;
                }

                /** {@inheritDoc} */
                public Integer next()
                {
                    if (hasNext())
                    {
                        int result = current;
                        current++;

                        return result;
                    }
                    else
                    {
                        throw new NoSuchElementException("No more elements less than or equal to max.");
                    }
                }

                /** {@inheritDoc} */
                public void remove()
                {
                    throw new UnsupportedOperationException("This iterator does not support 'remove'.");
                }
            };
    }
public Iterator<Integer> getAllPossibleValuesIterator() throws InfiniteValuesException
    {
        return new Iterator<Integer>()
            {
                int current = minValue;

                /** {@inheritDoc} */
                public boolean hasNext()
                {
                    return current <= maxValue;
                }

                /** {@inheritDoc} */
                public Integer next()
                {
                    if (hasNext())
                    {
                        int result = current;
                        current++;

                        return result;
                    }
                    else
                    {
                        throw new NoSuchElementException("No more elements less than or equal to max.");
                    }
                }

                /** {@inheritDoc} */
                public void remove()
                {
                    throw new UnsupportedOperationException("This iterator does not support 'remove'.");
                }
            };
    }
{@inheritDoc}