Java Code Examples for org.apache.commons.collections4.IteratorUtils

The following examples show how to use org.apache.commons.collections4.IteratorUtils. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: ghidra   Source File: PopupActionManager.java    License: Apache License 2.0 6 votes vote down vote up
JPopupMenu createPopupMenu(Iterator<DockingActionIf> localActions, ActionContext context) {

		if (localActions == null) {
			localActions = IteratorUtils.emptyIterator();
		}

		MenuHandler popupMenuHandler = new PopupMenuHandler(windowManager, context);
		MenuManager menuMgr =
			new MenuManager("Popup", '\0', null, true, popupMenuHandler, menuGroupMap);
		populatePopupMenuActions(localActions, context, menuMgr);
		if (menuMgr.isEmpty()) {
			return null;
		}

		// Popup menu if items are available
		JPopupMenu popupMenu = menuMgr.getPopupMenu();
		popupMenu.addPopupMenuListener(popupMenuHandler);
		return popupMenu;
	}
 
Example 2
Source Project: ghidra   Source File: ToolActions.java    License: Apache License 2.0 6 votes vote down vote up
private Iterator<DockingActionIf> getAllActionsIterator() {

		// chain all items together, rather than copy the data
		Iterator<DockingActionIf> iterator = IteratorUtils.emptyIterator();
		Collection<Map<String, Set<DockingActionIf>>> maps = actionsByNameByOwner.values();
		for (Map<String, Set<DockingActionIf>> actionsByName : maps) {
			for (Set<DockingActionIf> actions : actionsByName.values()) {
				Iterator<DockingActionIf> next = actions.iterator();

				// Note: do not use apache commons here--the code below degrades exponentially
				//iterator = IteratorUtils.chainedIterator(iterator, next);
				iterator = Iterators.concat(iterator, next);
			}
		}

		return Iterators.concat(iterator, sharedActionMap.values().iterator());
	}
 
Example 3
Source Project: ghidra   Source File: AbstractMemSearchTest.java    License: Apache License 2.0 6 votes vote down vote up
protected void checkMarkerSet(List<Address> expected) {

		TableComponentProvider<?>[] providers = tableServicePlugin.getManagedComponents();
		TableComponentProvider<?> tableProvider = providers[0];
		assertTrue(tool.isVisible(tableProvider));

		List<Address> highlights = getHighlightAddresses();
		assertListEqualUnordered("Search highlights not correctly generated", expected, highlights);

		MarkerSet markers =
			runSwing(() -> markerService.getMarkerSet(tableProvider.getName(), program));
		assertNotNull(markers);

		AddressSet addressSet = runSwing(() -> markers.getAddressSet());
		AddressIterator it = addressSet.getAddresses(true);
		List<Address> list = IteratorUtils.toList(it);

		assertListEqualUnordered("Search markers not correctly generated", expected, list);
	}
 
Example 4
Source Project: tcases   Source File: TupleCombiner.java    License: MIT License 6 votes vote down vote up
/**
 * Returns the set of once-only tuple definitions for this combiner.
 */
private Set<Tuple> getOnceTupleDefs( final List<VarDef> combinedVars)
  {
  try
    {
    return
      new HashSet<Tuple>(
        IteratorUtils.toList(
          IteratorUtils.transformedIterator(
            getOnceTuples(),
            tupleRef -> toTuple( combinedVars, tupleRef))));
    }
  catch( Exception e)
    {
    throw new IllegalStateException( "Invalid once-only tuple definition", e);
    }
  }
 
Example 5
Source Project: tcases   Source File: Cnf.java    License: MIT License 6 votes vote down vote up
/**
 * Returns true if the given disjunction is universally true.
 */
public static boolean isTautology( IDisjunct disjunct)
  {
  boolean tautology = false;
  if( disjunct != null)
    {
    IAssertion[] assertions = IteratorUtils.toArray( disjunct.getAssertions(), IAssertion.class);
    int max = assertions.length;
    int maxCompared = max - 1;
    
    for( int compared = 0;
         !tautology && compared < maxCompared;
         compared++)
      {
      IAssertion assertCompared = assertions[ compared];
      
      for( int other = compared + 1;
           !tautology && other < max;
           tautology = assertCompared.negates( assertions[ other++]));
      }
    }
  
  return tautology;
  }
 
Example 6
Source Project: tcases   Source File: TestTupleCombiner.java    License: MIT License 6 votes vote down vote up
@Test
public void getCombinedVars_All()
  {
  // Given...
  SystemInputDef systemInputDef = getSystemInputDef();
  FunctionInputDef functionInputDef = systemInputDef.getFunctionInputDef( "Make");
  TupleCombiner combiner = new TupleCombiner();
  
  // When...
  List<VarDef> combined = combiner.getCombinedVars( functionInputDef);
  
  // Then...
  assertThat(
    "Combined vars",
    IteratorUtils.transformedIterator(
      combined.iterator(),
      VarDef::getPathName),
    visitsMembers(
      "Color.Hue",
      "Color.Lightness",
      "Color.Saturation",
      "Shape",
      "Size"));
  }
 
Example 7
Source Project: tcases   Source File: TestTupleCombiner.java    License: MIT License 6 votes vote down vote up
@Test
public void getCombinedVars_Included()
  {
  // Given...
  SystemInputDef systemInputDef = getSystemInputDef();
  FunctionInputDef functionInputDef = systemInputDef.getFunctionInputDef( "Make");
  TupleCombiner combiner = new TupleCombiner().addIncludedVar( "Size");
  
  // When...
  List<VarDef> combined = combiner.getCombinedVars( functionInputDef);
  
  // Then...
  assertThat(
    "Combined vars",
    IteratorUtils.transformedIterator(
      combined.iterator(),
      VarDef::getPathName),
    visitsMembers( "Size"));
  }
 
Example 8
Source Project: tcases   Source File: TestTupleCombiner.java    License: MIT License 6 votes vote down vote up
@Test
public void getCombinedVars_Excluded()
  {
  // Given...
  SystemInputDef systemInputDef = getSystemInputDef();
  FunctionInputDef functionInputDef = systemInputDef.getFunctionInputDef( "Make");
  TupleCombiner combiner = new TupleCombiner().addExcludedVar( "Size");
  
  // When...
  List<VarDef> combined = combiner.getCombinedVars( functionInputDef);
  
  // Then...
  assertThat(
    "Combined vars",
    IteratorUtils.transformedIterator(
      combined.iterator(),
      VarDef::getPathName),
    visitsMembers(
      "Color.Hue",
      "Color.Lightness",
      "Color.Saturation",
      "Shape"));
  }
 
Example 9
Source Project: tcases   Source File: TestTupleCombiner.java    License: MIT License 6 votes vote down vote up
@Test
public void getCombinedVars_Some()
  {
  // Given...
  SystemInputDef systemInputDef = getSystemInputDef();
  FunctionInputDef functionInputDef = systemInputDef.getFunctionInputDef( "Make");
  TupleCombiner combiner = new TupleCombiner().addIncludedVar( "Color.*").addExcludedVar( "Color.Hue");
  
  // When...
  List<VarDef> combined = combiner.getCombinedVars( functionInputDef);
  
  // Then...
  assertThat(
    "Combined vars",
    IteratorUtils.transformedIterator(
      combined.iterator(),
      VarDef::getPathName),
    visitsMembers(
      "Color.Lightness",
      "Color.Saturation"));
  }
 
Example 10
Source Project: tcases   Source File: TestTupleGenerator.java    License: MIT License 6 votes vote down vote up
@Test
public void getTests_FromBaseTests_Same()
  {
  // Given...
  SystemInputDef systemInputDef = getSystemInputDefBase();
  FunctionInputDef functionInputDef = systemInputDef.getFunctionInputDef( "Make");
  TupleGenerator generator = new TupleGenerator();

  generator.addCombiner
    ( new TupleCombiner(2)
      .addIncludedVar( "Shape")
      .addIncludedVar( "Size"));
  
  // When...
  FunctionTestDef baseTestDef = generator.getTests( functionInputDef, null);
  FunctionTestDef functionTestDef = generator.getTests( functionInputDef, baseTestDef);

  // Expect...
  List<TestCase> expectedTestCases = IteratorUtils.toList( baseTestDef.getTestCases());
  List<TestCase> actualTestCases = IteratorUtils.toList( functionTestDef.getTestCases());
  assertThat( "When base tests same", actualTestCases, containsMembers( expectedTestCases));
  }
 
Example 11
Source Project: tcases   Source File: AssertTestDef.java    License: MIT License 6 votes vote down vote up
/**
 * Reports a failure if any TestCase fails to bind the variables defined by the FunctionInputDef.
 */
public static void assertTestCasesComplete( FunctionInputDef inputDef, FunctionTestDef testDef)
  {
  List<String> vars =
    IteratorUtils.toList(
      IteratorUtils.transformedIterator(
        new VarDefIterator( inputDef),
        VarDef::getPathName));
  
  for( Iterator<TestCase> testCases = testDef.getTestCases(); testCases.hasNext(); )
    {
    TestCase testCase = testCases.next();
    assertThat(
      "Vars, testCase=" + testCase.getId(),
      IteratorUtils.transformedIterator(
        testCase.getVarBindings(),
        VarBinding::getVar),
      visitsMembers( vars));
    }
  }
 
Example 12
Source Project: tcases   Source File: SystemTestHtmlWriter.java    License: MIT License 6 votes vote down vote up
/**
 * Writes the input value definitions for all variables of the given type.
 */
protected void writeInputs( TestCase testCase, String type)
  {
  Iterator<VarBinding> varBindings =
    IteratorUtils.filteredIterator
      ( testCase.getVarBindings( type),
        binding -> !binding.isValueNA());

  if( varBindings.hasNext())
    {
    xmlWriter_
      .element( "DIV")
      .attribute( "class", "input " + type)
      .content( () ->
        {
        if( !IVarDef.ARG.equals( type))
          {
          xmlWriter_.element( "H3").content( type).write();
          }
  
        writeVarSets( 0, varBindings);
        })
      .write();
    }
  }
 
Example 13
Source Project: tcases   Source File: SystemInputJson.java    License: MIT License 6 votes vote down vote up
public void visit( Not condition)
{
ICondition[] conditions = IteratorUtils.toArray( condition.getConditions(), ICondition.class);

JsonObjectBuilder builder = Json.createObjectBuilder();
if( conditions.length > 1)
  {
  builder.add( NOT_KEY, toJson( new AnyOf( conditions)));
  }
else if( conditions[0].getClass().equals( ContainsAny.class))
  {
  // Special case: abbreviate "not:{hasAny:[...]}" as "hasNone:[...]".
  JsonArrayBuilder properties = Json.createArrayBuilder();
  toStream( ((ContainsAny) conditions[0]).getProperties()).forEach( property -> properties.add( property));
  builder.add( HAS_NONE_KEY, properties);
  }
else
  {
  builder.add( NOT_KEY, toJson( conditions[0]));
  }

json_ = builder.build();
}
 
Example 14
Source Project: metron   Source File: HBaseWriterFunctionTest.java    License: Apache License 2.0 6 votes vote down vote up
@Test
public void testWrite() throws Exception {

  JSONObject message = getMessage();
  String entity = (String) message.get("ip_src_addr");
  long timestamp = (Long) message.get("timestamp");
  ProfileConfig profile = getProfile();

  // setup the profile measurements that will be written
  List<ProfileMeasurement> measurements = createMeasurements(1, entity, timestamp, profile);

  // setup the function to test
  HBaseWriterFunction function = new HBaseWriterFunction(profilerProperties);
  function.withTableProviderImpl(MockHBaseTableProvider.class.getName());

  // write the measurements
  Iterator<Integer> results = function.call(measurements.iterator());

  // validate the result
  List<Integer> counts = IteratorUtils.toList(results);
  assertEquals(1, counts.size());
  assertEquals(1, counts.get(0).intValue());
}
 
Example 15
Source Project: metron   Source File: HBaseWriterFunctionTest.java    License: Apache License 2.0 6 votes vote down vote up
@Test
public void testWriteMany() throws Exception {

  JSONObject message = getMessage();
  String entity = (String) message.get("ip_src_addr");
  long timestamp = (Long) message.get("timestamp");
  ProfileConfig profile = getProfile();

  // setup the profile measurements that will be written
  List<ProfileMeasurement> measurements = createMeasurements(10, entity, timestamp, profile);

  // setup the function to test
  HBaseWriterFunction function = new HBaseWriterFunction(profilerProperties);
  function.withTableProviderImpl(MockHBaseTableProvider.class.getName());

  // write the measurements
  Iterator<Integer> results = function.call(measurements.iterator());

  // validate the result
  List<Integer> counts = IteratorUtils.toList(results);
  assertEquals(1, counts.size());
  assertEquals(10, counts.get(0).intValue());
}
 
Example 16
Source Project: metron   Source File: HBaseWriterFunctionTest.java    License: Apache License 2.0 6 votes vote down vote up
@Test
public void testWriteNone() throws Exception {

  // there are no profile measurements to write
  List<ProfileMeasurement> measurements = new ArrayList<>();

  // setup the function to test
  HBaseWriterFunction function = new HBaseWriterFunction(profilerProperties);
  function.withTableProviderImpl(MockHBaseTableProvider.class.getName());

  // write the measurements
  Iterator<Integer> results = function.call(measurements.iterator());

  // validate the result
  List<Integer> counts = IteratorUtils.toList(results);
  assertEquals(1, counts.size());
  assertEquals(0, counts.get(0).intValue());
}
 
Example 17
Source Project: ontopia   Source File: TologQueryTag.java    License: Apache License 2.0 6 votes vote down vote up
/**
  * INTERNAL: Wraps a QueryResultIF instance in a suitable
  * MapCollection implementation.
  */ 
 protected Collection getMapCollection(QueryResultIF result) {

   if (select != null) {
     int index = result.getIndex(select);
     if (index < 0)
throw new IndexOutOfBoundsException("No query result column named '" + select + "'");

     List list = new ArrayList();
     while (result.next())
       list.add(result.getValue(index));
     result.close();
     return list;
   }

   if (result instanceof net.ontopia.topicmaps.query.impl.basic.QueryResult)
     // BASIC
     return net.ontopia.topicmaps.query.impl.basic.QueryResultWrappers.getWrapper(result);
   else {
     // FIXME: Should pass collection size if available.
     return IteratorUtils.toList(new QueryResultIterator(result));
   }
 }
 
Example 18
Source Project: ontopia   Source File: OccurrenceIndexTest.java    License: Apache License 2.0 6 votes vote down vote up
@Test
public void testValuesSmallerThanOrEqual() {
  Assert.assertFalse(ix.getValuesSmallerThanOrEqual("").hasNext());
  
  builder.makeOccurrence(builder.makeTopic(), builder.makeTopic(), "a");
  builder.makeOccurrence(builder.makeTopic(), builder.makeTopic(), "b");
  builder.makeOccurrence(builder.makeTopic(), builder.makeTopic(), "c");
  
  List<String> values = IteratorUtils.toList(ix.getValuesSmallerThanOrEqual("c"));
  
  Assert.assertEquals(3, values.size());
  Assert.assertTrue(values.contains("a"));
  Assert.assertTrue(values.contains("b"));
  Assert.assertTrue(values.contains("c"));

  values = IteratorUtils.toList(ix.getValuesSmallerThanOrEqual("a"));
  Assert.assertEquals(1, values.size());
  Assert.assertTrue(values.contains("a"));
}
 
Example 19
Source Project: ontopia   Source File: IndexResource.java    License: Apache License 2.0 6 votes vote down vote up
protected Collection<?> getOccurrences(String value, String datatype) {
	OccurrenceIndexIF index = getIndex(OccurrenceIndexIF.class);
	
	try {
		switch (getAttribute("type").toUpperCase()) {
			case "VALUE":
				if (datatype == null) return index.getOccurrences(value);
				else return index.getOccurrences(value, new URILocator(datatype));
			case "PREFIX":
				if (value == null) throw OntopiaRestErrors.MANDATORY_ATTRIBUTE_IS_NULL.build("value", "String");
				if (datatype == null) return index.getOccurrencesByPrefix(value);
				else return index.getOccurrencesByPrefix(value, new URILocator(datatype));
			case "GTE": return IteratorUtils.toList(index.getValuesGreaterThanOrEqual(value));
			case "LTE": return IteratorUtils.toList(index.getValuesSmallerThanOrEqual(value));

			default: 
				setStatus(Status.CLIENT_ERROR_NOT_FOUND, TYPE_ERROR_MESSAGE);
				return null;
		}
	} catch (MalformedURLException mufe) {
		throw OntopiaRestErrors.MALFORMED_LOCATOR.build(mufe, datatype);
	}
}
 
Example 20
Source Project: sqlg   Source File: TestVertexNavToEdges.java    License: MIT License 6 votes vote down vote up
@Test
public void testFromVertexGetEdges() {
    Vertex v1 = sqlgGraph.addVertex();
    Vertex v2 = sqlgGraph.addVertex();
    Edge e = v1.addEdge("label1", v2, "name", "marko");
    sqlgGraph.tx().commit();
    assertDb(Topology.EDGE_PREFIX + "label1", 1);
    assertDb(Topology.VERTEX_PREFIX  +  "vertex", 2);

    Iterator<Edge> edges = v1.edges(Direction.BOTH, "label1");
    List<Edge> toList= IteratorUtils.toList(edges);
    assertEquals(1, toList.size());
    Edge edge = toList.get(0);
    assertEquals(e, edge);
    String name = edge.<String>property("name").value();
    assertEquals("marko", name);

    assertFalse(vertexTraversal(this.sqlgGraph, v1).inE("label1").hasNext());
    edge = vertexTraversal(this.sqlgGraph, v1).bothE("label1").next();
    assertEquals(e, edge);

    name = edge.<String>property("name").value();
    assertEquals("marko", name);
}
 
Example 21
Source Project: tabu   Source File: TabuSearch.java    License: MIT License 6 votes vote down vote up
/**
 * Execute the algorithm to perform a minimization.
 * @param initialSolution the start point of the algorithm
 * @return the best solution found in the given conditions
 */
public Solution run(Solution initialSolution) {
	Solution bestSolution = initialSolution;
	Solution currentSolution = initialSolution;
	
	Integer currentIteration = 0;
	while (!stopCondition.mustStop(++currentIteration, bestSolution)) {
		
		List<Solution> candidateNeighbors = currentSolution.getNeighbors();
		List<Solution> solutionsInTabu = IteratorUtils.toList(tabuList.iterator());
		
		Solution bestNeighborFound = solutionLocator.findBestNeighbor(candidateNeighbors, solutionsInTabu);
		if (bestNeighborFound.getValue() < bestSolution.getValue()) {
			bestSolution = bestNeighborFound;
		}
		
		tabuList.add(currentSolution);
		currentSolution = bestNeighborFound;
		
		tabuList.updateSize(currentIteration, bestSolution);
	}
	
	return bestSolution;
}
 
Example 22
Source Project: gocd   Source File: FelixGoPluginOSGiFramework.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public void start() {
    List<FrameworkFactory> frameworkFactories = IteratorUtils.toList(ServiceLoader.load(FrameworkFactory.class).iterator());

    if (frameworkFactories.size() != 1) {
        throw new RuntimeException("One OSGi framework expected. Got " + frameworkFactories.size() + ": " + frameworkFactories);
    }

    try {
        framework = getFelixFramework(frameworkFactories);
        framework.start();
        registerInternalServices(framework.getBundleContext());
    } catch (BundleException e) {
        throw new RuntimeException("Failed to initialize OSGi framework", e);
    }
}
 
Example 23
Source Project: ghidra   Source File: AssemblyResolvedConstructor.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Get an iterable over all the possible fillings of the instruction pattern given a context
 * 
 * This is meant to be used idiomatically, as in an enhanced for loop:
 * 
 * <pre>
 * {@code
 * for (byte[] ins : rcon.possibleInsVals(ctx)) {
 *     System.out.println(format(ins));
 * }
 * }
 * </pre>
 * 
 * This is similar to calling
 * {@link #getInstruction()}.{@link AssemblyPatternBlock#possibleVals()}, <em>but</em> with
 * forbidden patterns removed. A context is required so that only those forbidden patterns
 * matching the given context are actually removed. This method should always be preferred to
 * the sequence mentioned above, since {@link AssemblyPatternBlock#possibleVals()} on its own
 * may yield bytes that do not produce the desired instruction. 
 * 
 * NOTE: The implementation is based on {@link AssemblyPatternBlock#possibleVals()}, so be
 * aware that a single array is reused for each iterate. You should not retain a pointer to the
 * array, but rather make a copy.
 * 
 * @param forCtx the context at the assembly address
 * @return the iterable
 */
public Iterable<byte[]> possibleInsVals(AssemblyPatternBlock forCtx) {
	Predicate<byte[]> removeForbidden = (byte[] val) -> {
		for (AssemblyResolvedConstructor f : forbids) {
			// If the forbidden length is larger than us, we can ignore it
			if (f.getDefinedInstructionLength() > val.length) {
				continue;
			}
			// Check if the context matches, if not, we can let it pass
			if (null == f.getContext().combine(forCtx)) {
				continue;
			}
			// If the context matches, now check the instruction
			AssemblyPatternBlock i = f.getInstruction();
			AssemblyPatternBlock vi =
				AssemblyPatternBlock.fromBytes(ins.length() - val.length, val);
			if (null == i.combine(vi)) {
				continue;
			}
			return false;
		}
		return true;
	};
	return new Iterable<byte[]>() {
		@Override
		public Iterator<byte[]> iterator() {
			return IteratorUtils.filteredIterator(ins.possibleVals().iterator(),
				removeForbidden);
		}
	};
}
 
Example 24
Source Project: datawave   Source File: JsonRecordReader.java    License: Apache License 2.0 5 votes vote down vote up
protected void setupIterator(JsonReader reader) {
    JsonParser parser = new JsonParser();
    JsonElement root = parser.parse(reader);
    
    if (root.isJsonArray()) {
        // Currently positioned to read a set of objects
        jsonIterator = root.getAsJsonArray().iterator();
    } else {
        // Currently positioned to read a single object
        jsonIterator = IteratorUtils.singletonIterator(root);
    }
}
 
Example 25
Source Project: datawave   Source File: JsonIngestFlattener.java    License: Apache License 2.0 5 votes vote down vote up
private void setupIterator(JsonReader reader) {
    JsonParser parser = new JsonParser();
    JsonElement root = parser.parse(reader);
    
    if (root.isJsonArray()) {
        // Currently positioned to read a set of objects
        jsonIterator = root.getAsJsonArray().iterator();
    } else {
        // Currently positioned to read a single object
        jsonIterator = IteratorUtils.singletonIterator(root);
    }
}
 
Example 26
Source Project: salesforce-jdbc   Source File: PartnerService.java    License: MIT License 5 votes vote down vote up
private List removeServiceInfo(XmlObject row) {
    return IteratorUtils.toList(row.getChildren()).stream()
            .filter(this::isDataObjectType)
            .skip(1) // Removes duplicate Id from SF Partner API response
            // (https://developer.salesforce.com/forums/?id=906F00000008kciIAA)
            .map(field -> isNestedResultset(field)
                    ? removeServiceInfo(field.getChildren())
                    : toForceResultField(field))
            .collect(Collectors.toList());
}
 
Example 27
Source Project: tcases   Source File: VarTupleSet.java    License: MIT License 5 votes vote down vote up
/**
 * Returns input tuples already used in a test case that bind the given variable, considering
 * only tuples that are (not) once-only
 */
public Iterator<Tuple> getUsed( VarDef var, final boolean onceOnly)
  {
  return
    getBinds(
      IteratorUtils.filteredIterator(
        getUsed(),
        tuple -> tuple.isOnce() == onceOnly),
      var);
  }
 
Example 28
Source Project: tcases   Source File: VarTupleSet.java    License: MIT License 5 votes vote down vote up
/**
 * Returns input tuples that bind the given variable.
 */
private Iterator<Tuple> getBinds( Iterator<Tuple> tuples, final VarDef var)
  {
  return
    IteratorUtils.filteredIterator(
      tuples,
      tuple -> tuple.getBinding( var) != null);
  }
 
Example 29
Source Project: tcases   Source File: TupleCombiner.java    License: MIT License 5 votes vote down vote up
/**
 * Returns the set of input variables to be included in this combination.
 */
public String[] getIncluded()
  {
  return
    IteratorUtils.toArray(
      IteratorUtils.transformedIterator(
        includedVars_.iterator(),
        VarNamePattern::toString),
      String.class);
  }
 
Example 30
Source Project: tcases   Source File: TupleCombiner.java    License: MIT License 5 votes vote down vote up
/**
 * Returns the set of input variables to be excluded from this combination.
 */
public String[] getExcluded()
  {
  return
    IteratorUtils.toArray(
      IteratorUtils.transformedIterator(
        excludedVars_.iterator(),
        VarNamePattern::toString),
      String.class);
  }