Commit c79d6ecf authored by yihua.huang's avatar yihua.huang

complete all comments

parent 90bbe9b9
......@@ -6,7 +6,7 @@ import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
/**
* Replace selector<br>
* Replace selector.<br>
*
* @author code4crafter@gmail.com <br>
* @since 0.1.0
......
......@@ -6,7 +6,7 @@ import java.util.ArrayList;
import java.util.List;
/**
* XPath selector based on HtmlCleaner<br>
* XPath selector based on HtmlCleaner.<br>
*
* @author code4crafter@gmail.com <br>
* @since 0.1.0
......
......@@ -5,7 +5,7 @@ import us.codecraft.webmagic.utils.Experimental;
import java.util.Collection;
/**
* Extract an object of more than one pages, such as news and articles<br>
* Extract an object of more than one pages, such as news and articles.<br>
*
* @author code4crafter@gmail.com <br>
* @since 0.2.0
......
......@@ -3,7 +3,7 @@ package us.codecraft.webmagic.model;
import us.codecraft.webmagic.Page;
/**
* Interface to be implemented by page models that need to do something after fields are extracted<br>
* Interface to be implemented by page models that need to do something after fields are extracted.<br>
*
* @author code4crafter@gmail.com <br>
* @since 0.2.0
......
......@@ -5,7 +5,7 @@ import us.codecraft.webmagic.Spider;
import us.codecraft.webmagic.processor.PageProcessor;
/**
* The spider for page model extractor<br>
* The spider for page model extractor.<br>
* In webmagic, we call a POJO containing extract result as "page model". <br>
* You can customize a crawler by write a page model with annotations. <br>
* Such as:
......
......@@ -5,7 +5,7 @@ import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**
* Define the extractor for field or class<br>
* Define the extractor for field or class.<br>
*
* @author code4crafter@gmail.com <br>
* @since 0.2.0
......
......@@ -14,7 +14,7 @@ import java.io.IOException;
import java.io.PrintWriter;
/**
* Store results objects (page models) to files in JSON format<br>
* Store results objects (page models) to files in JSON format.<br>
* Use model.getKey() as file name if the model implements HasKey.<br>
* Otherwise use SHA1 as file name.
*
......
......@@ -13,7 +13,7 @@ import java.io.IOException;
import java.io.PrintWriter;
/**
* Store results to files in JSON format<br>
* Store results to files in JSON format.<br>
*
* @author code4crafter@gmail.com <br>
* @since 0.2.0
......
......@@ -9,7 +9,7 @@ import us.codecraft.webmagic.Request;
import us.codecraft.webmagic.Task;
/**
* Use Redis as url scheduler for distributed crawlers<br>
* Use Redis as url scheduler for distributed crawlers.<br>
*
* @author code4crafter@gmail.com <br>
* @since 0.2.0
......
......@@ -92,7 +92,6 @@ public class DoubleKeyMap<K1, K2, V> extends MultiKeyMapBase {
return null;
}
V remove = get(key1).remove(key2);
// 如果上一级map为空,把它也回收掉
if (get(key1).size() == 0) {
remove(key1);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment