List of usage examples for java.util Hashtable Hashtable
Hashtable(Void dummy)
From source file:com.springsource.insight.plugin.ldap.TestLdapContext.java
public TestLdapContext(@SuppressWarnings("hiding") Hashtable<?, ?> environment) { this.environment = new Hashtable<Object, Object>(environment); }
From source file:edu.csun.ecs.cs.multitouchj.application.whiteboard.ui.InteractiveCanvas.java
public Map<Integer, Pen> getPens() { return new Hashtable<Integer, Pen>(pens); }
From source file:com.flexive.extractor.ExtractedData.java
/** * Returns a compressed form of the extracted text that only contains words with at least * 4 and at most 30 characters, and contains every distinct uppercase word only one time. * Additional text (eg text from html tag attributes like 'title' and 'alt') stored in the * FxSummaryInformation will be included. * * @return a compressed form of the extracted text *//*from w ww . j a va 2 s .c o m*/ public String getCompressedText() { if (compressed == null) { Hashtable<String, Boolean> words = new Hashtable<String, Boolean>(5000); StringBuffer concateWords = new StringBuffer(30000); // Split by whitespaces and other chars, also remove dups. // Only keep words that have more than 3 characters String txt = this.text; if (si != null) txt += (si.getTitle() == null ? "" : " " + si.getTitle()) + (si.getKeywords() == null ? "" : " " + si.getKeywords()) + (si.getAuthor() == null ? "" : " " + si.getAuthor()) + (si.getComments() == null ? "" : " " + si.getComments()) + (si.getRevNumber() == null ? "" : " " + si.getRevNumber()) + (si.getAdditionalText() == null ? " " : si.getAdditionalText()); txt = txt.replace("?", " ").replace(".", " ").replace("!", " "); String[] sw = txt.split("[\\s,;:=\\(\\)\"-']"); for (String word : sw) { if (word.length() < 4 || word.length() > 30) continue; words.put(word.toUpperCase(), Boolean.TRUE); } for (Enumeration e = words.keys(); e.hasMoreElements();) { concateWords.append(" ").append(e.nextElement()); } compressed = concateWords.toString(); } return compressed; }