private void addRetractions() { List<String> vars = model.getLHSBoundFacts(); if ( vars.size() == 0 ) { return; } choices.addItem( SECTION_SEPARATOR ); for ( Iterator<String> iter = vars.iterator(); iter.hasNext(); ) { final String v = iter.next(); choices.addItem( Constants.INSTANCE.Retract0( v ), "RET" + v ); cmds.put( "RET" + v, new Command() { public void execute() { addRetract( v, Integer.parseInt( positionCbo.getValue( positionCbo.getSelectedIndex() ) ) ); hide(); } } ); } }
private void addGlobalCollections() { List<String> vars = model.getLHSBoundFacts(); if ( vars.size() == 0 ) { return; } if ( completions.getGlobalCollections().length == 0 ) { return; } choices.addItem( SECTION_SEPARATOR ); for ( String bf : vars ) { for ( int i = 0; i < completions.getGlobalCollections().length; i++ ) { final String glob = completions.getGlobalCollections()[ i ]; final String var = bf; choices.addItem( Constants.INSTANCE.Append0ToList1( var, glob ), "GLOBCOL" + glob + var ); cmds.put( "GLOBCOL" + glob + var, new Command() { public void execute() { ActionGlobalCollectionAdd gca = new ActionGlobalCollectionAdd(); gca.setGlobalName( glob ); gca.setFactName( var ); model.addRhsItem( gca, Integer.parseInt( positionCbo.getValue( positionCbo.getSelectedIndex() ) ) ); hide(); } } ); } } }
List<String> vars = model.getModel().getLHSBoundFacts(); for ( String v : vars ) { FactPattern factPattern = model.getModel().getLHSBoundFact( v );
List<String> vars = model.getModel().getLHSBoundFacts(); List<String> vars2 = model.getModel().getRHSBoundFacts(); for ( String i : vars2 ) {
model.getLHSBoundFacts().size() ); assertEquals( "x", model.getLHSBoundFacts().get( 0 ) );