[JAVA-19] BasicDBList missing javadoc on methods Created: 12/Aug/09  Updated: 02/Oct/09  Resolved: 12/Aug/09

Status: Closed
Project: Java Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 0.8

Type: Bug Priority: Minor - P4
Reporter: Ryan Nitz Assignee: Kristina Chodorow (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

This method is not documented. I assume it is simply a convenience method for setting the index.

Object put(int key, Object v)

Why would someone use a string value to specify the index? This is obviously here to support the interface. You may want to specify this in the JavaDocs (i.e., use the int).

Object put(String key, Object v)
Put a value at an index.

Perhaps the example at the top of the class should also include:

BasicDBList list = new BasicDBList();
while (something) {
list.add(new BasicDBObject("foo", "bar"));
}

myObj.put("list", list);



 Comments   
Comment by Kristina Chodorow (Inactive) [ 12/Aug/09 ]

You're not allowed to save non-numeric keys in a BasicDBList, actually. I changed the documentation to make that clearer.

Generated at Thu Feb 08 08:51:20 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.