aspose file tools*
The moose likes Java in General and the fly likes How to interpret something- not sure what to call it, the urls that describe a class and its methods Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to interpret something- not sure what to call it, the urls that describe a class and its methods" Watch "How to interpret something- not sure what to call it, the urls that describe a class and its methods" New topic
Author

How to interpret something- not sure what to call it, the urls that describe a class and its methods

Matt Kohanek
Village Idiot
Ranch Hand

Joined: Apr 04, 2009
Posts: 483

I often see pages like this one:

http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/docs/apidoc_framework/org/richfaces/model/TreeNode.html#getChildren()

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: 42263
    
  64
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.


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to interpret something- not sure what to call it, the urls that describe a class and its methods