/** * Find instances of config objects with the given base name. * This is the same as <code>findConfigObjects(baseName, true)</code>. * Aliases are filtered out so that all returned instances are unique. * * @param baseName base name of desired config object class * @return ArrayList of config object instances of the desired base * class, or null if instances of the base class don't exist */ Collection findConfigObjects(String baseName) { return findConfigObjects(baseName, true) ; }
private ReadOnlySet createSet(String baseName) { Collection c = findConfigObjects(baseName, true) ; if (c == null || c.size() == 0) return null ; Iterator i = c.iterator() ; ArrayList l = new ArrayList() ; while (i.hasNext()) l.add(((ConfigObject)i.next()).targetObject) ; return new ReadOnlySet(l) ; }
private ReadOnlyMap createMap(String baseName) { Collection c = findConfigObjects(baseName, false) ; if (c == null || c.size() == 0) return null ; Iterator i = c.iterator() ; HashMap m = new HashMap() ; while (i.hasNext()) { ConfigObject co = (ConfigObject)i.next() ; if (co.isAlias) m.put(co.instanceName, co.original.targetObject) ; else m.put(co.instanceName, co.targetObject) ; } return new ReadOnlyMap(m) ; }
c = findConfigObjects("PhysicalBody") ; if (c != null) { processPhysicalBodies(c) ; pe = findConfigObjects("PhysicalEnvironment") ; if (pe != null) { processPhysicalEnvironments(pe) ; c = findConfigObjects("View") ; if (c != null) { processViews(c, setVisible) ; c = findConfigObjects("Device") ; s = findConfigObjects("Sensor") ; if (c != null) { processDevices(c, s, pe) ; vp = findConfigObjects("ViewPlatform") ; if (vp != null) { processViewPlatforms(vp, transformCount) ; c = findConfigObjects("ViewPlatformBehavior") ; if (c != null) { processViewPlatformBehaviors(c, vp, attachBehaviors) ; c = findConfigObjects("Object") ; if (c != null) { processGenericObjects(c) ;
c = configContainer.findConfigObjects("ViewPlatform"); if (c == null || c.size() == 0) { createDefaultViewingPlatform(transformCount);