开发者

Explain head and tail methods in NodeVisitor interface in Jsoup

While Jsoup appears to be very good library to scrap HTML but unfortunately its API has virtually no documentation. Here is the API for Nodevisitor class:

http://jsoup.org/apidocs/org开发者_如何学编程/jsoup/select/NodeVisitor.html

Can you explain what head and tail means (these terms usually associated with queues) and what datastructures and algorithms are being implied here and why I would implement head or tail?


In a "general" context, head refers to the first element of a list, and tail to the remainder of the list. This is especially popular in functional programming where it is used to traverse lists recursively instead of iteratively.

However, in this specific context, I don't know ...however, I'm always suspicious about the quality of undocumented APIs.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜