That have a method summary, method etails, etc etc
But Im not sure how to read some of these things. For instance from Interface TreeNode<T> I am looking at:
getChildren
java.util.Iterator<java.util.Map.Entry><java.lang.Object,TreeNode><T>>> getChildren()
Getter for children entries. Each children entry contains identifier (key) and child node (value). Identifiers are used to generate model keys representing paths to tree node. Model keys are used:
For persisting tree state. That means that identifiers should be serializable when some JSF features are used, e.g. client-side state saving.
For constructing client identifiers. Client identifier for tree nodes consists of Object.toString() representations of identifier separated with NamingContainer.SEPARATOR_CHAR chars. String representation of identifier should be a valid XML ID, e.g. conform to this: XML Name Production production.
Returns:
Iterator of Map.Entry instances containing TreeNode as values and their identifiers as keys.
Particularly that second line. I believe that is showing how the methiod should be constructed right? So if Im right it would look something like:
That seems wrong when I look at it though. Can someone clear this up or is there a resource somewhere that tells you how to read the multitude of pages that look like this?
True wisdom is in knowing you know nothing - Socrates
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35220
7
posted
0
Well, methods do not get constructed. That line shows what kind of object that method returns as result. In this case, it returns an Iterator, the elements of which are Map.Entry objects.
If you look at the javadocs of Map.Entry, you'll see that it associates two elements - a key and a value. So in this case, nothing further is known in advance about the key (it is an Object - which is true for all objects in Java), but the value will always be of type TreeNode.