Examples of IteratorToValueIteratorBridge


Examples of org.drools.planner.core.heuristic.selector.value.iterator.IteratorToValueIteratorBridge

    public ValueIterator iterator() {
        Collections.shuffle(cachedValueList, workingRandom);
        logger.trace("    Shuffled cachedValueList with size ({}) in valueSelector({}).",
                cachedValueList.size(), this);
        return new IteratorToValueIteratorBridge(cachedValueList.iterator());
    }
View Full Code Here

Examples of org.drools.planner.core.heuristic.selector.value.iterator.IteratorToValueIteratorBridge

        return (long) cachedValueList.size();
    }

    public ValueIterator iterator() {
        if (!randomSelection) {
            return new IteratorToValueIteratorBridge(cachedValueList.iterator());
        } else {
            return new EntityIgnoringValueIterator() {
                public boolean hasNext() {
                    return true;
                }
View Full Code Here

Examples of org.drools.planner.core.heuristic.selector.value.iterator.IteratorToValueIteratorBridge

        return randomSelection;
    }

    public ValueIterator iterator() {
        if (!randomSelection) {
            return new IteratorToValueIteratorBridge(cachedValueList.iterator());
        } else {
            return new IteratorToValueIteratorBridge(
                    new CachedListRandomIterator<Object>(cachedValueList, workingRandom));
        }
    }
View Full Code Here

Examples of org.drools.planner.core.heuristic.selector.value.iterator.IteratorToValueIteratorBridge

        ValueSelector valueSelector = mock(ValueSelector.class);
        when(valueSelector.getVariableDescriptor()).thenReturn(variableDescriptor);
        final List<Object> valueList = Arrays.<Object>asList(values);
        when(valueSelector.iterator()).thenAnswer(new Answer<Iterator<Object>>() {
            public ValueIterator answer(InvocationOnMock invocation) throws Throwable {
                return new IteratorToValueIteratorBridge(valueList.iterator());
            }
        });
        when(valueSelector.isContinuous()).thenReturn(false);
        when(valueSelector.isNeverEnding()).thenReturn(false);
        when(valueSelector.getSize()).thenReturn((long) valueList.size());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.