Java 类org.jsoup.Connection.KeyVal 实例源码

项目:AcornAPI    文件:Acorn.java   
/**
 * Give a Document, parse it and return all form data.
 * 
 * @param doc
 * @return null if this Document has more than one form or does not have form
 */
private static Map<String, String> getFormData(Document doc){
    Elements formElements = doc.getElementsByTag("form");
    if(formElements.size() != 1)
        return null;
    List<FormElement> forms = formElements.forms();
    List<KeyVal> data = forms.get(0).formData();
    HashMap<String, String> map = new HashMap<String, String>();
    for(KeyVal kv: data){
        map.put(kv.key(), kv.value());
    }
    return map;
}
项目:UofT-Timetable    文件:Acorn.java   
/**
 * Give a Document, parse it and return all form data.
 *
 * @param doc
 * @return null if this Document has more than one form or does not have form
 */
private static Map<String, String> getFormData(Document doc){
    Elements formElements = doc.getElementsByTag("form");
    if(formElements.size() != 1)
        return null;
    List<FormElement> forms = formElements.forms();
    List<KeyVal> data = forms.get(0).formData();
    HashMap<String, String> map = new HashMap<String, String>();
    for(KeyVal kv: data){
        map.put(kv.key(), kv.value());
    }
    return map;
}
项目:docx4j-template    文件:DataMap.java   
public Collection<KeyVal> getData1() {
    return data1;
}
项目:docx4j-template    文件:DataMap.java   
public void setData1(Collection<KeyVal> data1) {
    this.data1 = data1;
}