public boolean isDataFlavorSupported(DataFlavor flavor) { return SUtil.arrayToSet(flavors).contains(flavor); } }
public boolean isDataFlavorSupported(DataFlavor flavor) { return SUtil.arrayToSet(flavors).contains(flavor); } }
/** * Create a new feature factory. */ public ComponentFeatureFactory(Class<?> type, Class<?> impl, Class<?>[] pres, Class<?>[] sucs, boolean autoaddlast, Class<?>[] lookuptypes) { this.type = type; this.impl = impl; this.pres = pres==null? null: (Set)SUtil.arrayToSet(pres); this.sucs = sucs==null? null: (Set)SUtil.arrayToSet(sucs); this.lookuptypes = lookuptypes; // automallically add the lifecycle feature as precondition for all (besides itself) if(autoaddlast) { if(this.sucs==null) this.sucs = new HashSet<Class<?>>(); this.sucs.add(ILifecycleComponentFeature.class); } }
Set proposals = SUtil.arrayToSet(nr.getProposals()); Set remaining = SUtil.arrayToSet(newparticipants); for(Iterator it=proposals.iterator(); it.hasNext(); )
Set proposals = SUtil.arrayToSet(nr.getProposals()); Set remaining = SUtil.arrayToSet(newparticipants); for(Iterator it=proposals.iterator(); it.hasNext(); )
Set<Block> bs = SUtil.arrayToSet(table.getAllBlocks()); ConfigureGoal configure = capa.new ConfigureGoal(table, bs); rplan.dispatchSubgoal(configure).get();
for(HttpHandler hand: handlers.keySet()) Set<String> set = SUtil.arrayToSet(handlers.get(hand)); if(set.contains(uri.getPath()))
if(SUtil.arrayToSet(File.listRoots()).contains(file) || file.isDirectory())
boolean isroot = SUtil.arrayToSet(File.listRoots()).contains(file); if(isroot || (file.exists() && file.canRead()) || SUtil.arrayToSet(File.listRoots()).contains(file))
final SendManager[] sms = (SendManager[])SUtil.arrayToSet(tmp).toArray(new SendManager[0]);
final SendManager[] sms = (SendManager[])SUtil.arrayToSet(tmp).toArray(new SendManager[0]);
public void run() { if(SUtil.arrayToSet(SFlyweightFunctionality.getBeliefNames(getState(), getHandle(), getScope())).contains(name)) { IBelief bel = (IBelief)SFlyweightFunctionality.getBelief(getState(), getHandle(), getScope(), name); bel.setFact(value); } else if(SUtil.arrayToSet(SFlyweightFunctionality.getBeliefSetNames(getState(), getHandle(), getScope())).contains(name)) { IBeliefSet belset = (IBeliefSet)SFlyweightFunctionality.getBeliefSet(getState(), getHandle(), getScope(), name); belset.removeFacts(); if(SReflect.isIterable(value)) { for(Iterator it=SReflect.getIterator(value); it.hasNext(); ) { belset.addFact(it.next()); } } else { belset.addFact(value); } } else { throw new RuntimeException("Unknown belief/set name: "+name); } } };
final SendManager[] sms = (SendManager[])SUtil.arrayToSet(tmp).toArray(new SendManager[0]);
if(selplugin!=null && !SUtil.arrayToSet(pls).contains(selplugin))
Set<String> allowed = SUtil.arrayToSet(au.names()); if(!allowed.contains(callername))
Set<String> allowed = SUtil.arrayToSet(au.names()); if(!allowed.contains(callername))
String[] imps = agent.getModel().getImports(); Set<String> impset = SUtil.arrayToSet(imps); if(impset.contains("b1") && impset.contains("b2") && impset.contains("eb1") && impset.contains("eb2"))
if(selplugin!=null && !SUtil.arrayToSet(pls).contains(selplugin))
if(SUtil.arrayToSet(SFlyweightFunctionality.getBeliefNames(getState(), getHandle(), getScope())).contains(name)) else if(SUtil.arrayToSet(SFlyweightFunctionality.getBeliefSetNames(getState(), getHandle(), getScope())).contains(name))