public void hashtablesCantContainNull(Hashtable h) { h.put("a", null); h.put(null, "a"); h.get(null); h.contains(null); h.containsKey(null); h.containsValue(null); h.remove(null); } }
/** * Check if the table contains a particular value. * @param value the value to look for. * @return true if the table contains the value. */ public boolean contains(Object value) { initAll(); return super.contains(value); }
if (toBeRemoved.contains(predPDGofdepB)) { blocks2BRemoved = toBeRemoved.get(predPDGofdepB); } else {
public void readSecurityData(PortletRequest request) { String moduleName = ""; if (webModules.containsKey(moduleName)) { WARConfigData warConfig = webModules.get(moduleName); warConfig.readSecurityData(request); } else if (ejbModules.contains(moduleName)) { EjbConfigData ejbConfig = ejbModules.get(moduleName); ejbConfig.readSecurityData(request); } else { System.out.println("Invaild module name: " + moduleName + " !!"); } }
public synchronized boolean contains(Object value) { return project.getProperties().contains(value); }
@NoWarning("GC_UNRELATED_TYPES") public boolean testContainsHashtable(Integer i) { return hashtable.contains(i); }
@ExpectWarning("GC_UNRELATED_TYPES") public boolean testContainsHashtable(String s) { return hashtable.contains(s); }
(_prefixMapping.contains(uri))) { Enumeration prefixes = _prefixMapping.keys(); while (prefixes.hasMoreElements()) {
/** * Takes the input from the user and generates the required heatmap. * Called when a search query is submitted */ public void submit(View view) { if ("YOUR_KEY_HERE".equals(API_KEY)) { Toast.makeText(this, "Please sign up for a Places API key and add it to HeatmapsPlacesDemoActivity.API_KEY", Toast.LENGTH_LONG).show(); return; } EditText editText = (EditText) findViewById(R.id.input_text); String keyword = editText.getText().toString(); if (mOverlays.contains(keyword)) { Toast.makeText(this, "This keyword has already been inputted :(", Toast.LENGTH_SHORT).show(); } else if (mOverlaysRendered == MAX_CHECKBOXES) { Toast.makeText(this, "You can only input " + MAX_CHECKBOXES + " keywords. :(", Toast.LENGTH_SHORT).show(); } else if (keyword.length() != 0) { mOverlaysInput++; ProgressBar progressBar = (ProgressBar) findViewById(R.id.progress_bar); progressBar.setVisibility(View.VISIBLE); new MakeOverlayTask().execute(keyword); editText.setText(""); InputMethodManager imm = (InputMethodManager) getSystemService( Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(editText.getWindowToken(), 0); } }
public Stack<String> asStringStack( String entry ) { Stack<String> directories = new Stack<String>(); // Don't include the last entry itself if it's // a dir; it will be added on its own. int slashPos = entry.length() - ( entry.endsWith( "/" ) ? 1 : 0 ); while ( ( slashPos = entry.lastIndexOf( '/', slashPos - 1 ) ) != -1 ) { String dir = entry.substring( 0, slashPos + 1 ); if ( addedDirs.contains( dir ) ) { break; } directories.push( dir ); } return directories; }
while (locales.hasMoreElements()) { Locale locale = (Locale) locales.nextElement(); if (supportedLanguages.contains(locale)) { requestLocale = locale; break;
/** * Returns true if the given {@link Schema} has been marked as processed * * @param schema the {@link Schema} to check for being marked as processed * @return true if the given {@link Schema} has been marked as processed */ boolean processed(Schema schema) { return _processed.contains(schema); }
public String getValue(String pKey, String pDefault) { if (!mDeviceConfig.mDeviceProperties.contains(pKey)) { return pDefault; } return mDeviceConfig.mDeviceProperties.get(pKey).toString(); }
protected void genASTDeclaration(AlternativeElement el, String var_name, String node_type) { // already declared? if (declaredASTVariables.contains(el)) return; // emit code println(node_type + " " + var_name + "_AST = null;"); // mark as declared declaredASTVariables.put(el,el); }
/** * @see java.util.Hashtable#contains(java.lang.Object) */ @Override public synchronized boolean contains(Object value) { return this.getDelegate().contains(value); }
protected void genASTDeclaration(AlternativeElement el, String var_name, String node_type) { // already declared? if (declaredASTVariables.contains(el)) return; // emit code //String s = StringUtils.stripFrontBack(node_type, "\"", "\""); //println(s + " " + var_name + "_AST = null;"); println(node_type + " " + var_name + "_AST = null;"); // mark as declared declaredASTVariables.put(el,el); }
public void addStep(DeclareStep step) { QName type = step.getDeclaredType(); if (type == null) { // It can't be called so it doesn't really matter... return; } if (declaredSteps.contains(type)) { throw new XProcException(step.getNode(), "You aren't allowed to do this"); } steps.add(step); declaredSteps.put(type, step); }
public void addStep(DeclareStep step) { QName type = step.getDeclaredType(); if (type == null) { // It can't be called so it doesn't really matter... return; } if (declaredSteps.contains(type)) { throw new XProcException(step.getNode(), "You aren't allowed to do this"); } steps.add(step); declaredSteps.put(type, step); }
public NakedCollection getAdapterForElseCreateAdapterForCollection( final NakedObject parent, final String fieldName, final NakedObjectSpecification elementSpecification, final Object collection) { if (collectionAdapters.contains(collection)) { return (NakedCollection) collectionAdapters.get(collection); } else { return createAdapterForCollection(collection, elementSpecification); } }
/** * INTERNAL: * This method is used to determine if the clone is a new Object in the UnitOfWork */ public boolean isObjectNew(Object clone) { //CR3678 - ported from 4.0 return (isCloneNewObject(clone) || (!isObjectRegistered(clone) && !getReadOnlyClasses().contains(clone.getClass()) && !getUnregisteredExistingObjects().contains(clone))); }