Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated return type that return containers to a Collection type.

  • Loading branch information...
commit f24904aac1aadcd811eaeb62673e8f9ab35a26e5 1 parent b091df1
@ccorsi authored
View
25 persistence/books/berkeleydb/.classpath
@@ -1,12 +1,13 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry combineaccessrules="false" kind="src" path="/BooksPersistenceBase"/>
- <classpathentry kind="lib" path="C:/tools/berkeleyDB/je-4.0.103/lib/je-4.0.103.jar" sourcepath="C:/tools/berkeleyDB/je-4.0.103/src">
- <attributes>
- <attribute name="javadoc_location" value="file:/C:/tools/berkeleyDB/je-4.0.103/docs/java/"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/BooksPersistenceBase"/>
+ <classpathentry kind="lib" path="C:/tools/berkeleyDB/je-4.0.103/lib/je-4.0.103.jar" sourcepath="C:/tools/berkeleyDB/je-4.0.103/src">
+ <attributes>
+ <attribute name="javadoc_location" value="file:/C:/tools/berkeleyDB/je-4.0.103/docs/java/"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
View
9 persistence/books/berkeleydb/src/books/persistence/types/berkeleydb/BookBerkeleyDB.java
@@ -23,6 +23,7 @@
*/
package books.persistence.types.berkeleydb;
+import java.util.Collection;
import java.util.Date;
import java.util.HashSet;
import java.util.LinkedList;
@@ -37,7 +38,7 @@
import books.persistence.types.PersonType;
/**
- * @author ccorsi
+ * @author Claudio Corsi
*
*/
@Entity
@@ -99,7 +100,7 @@ public Date getDateFinishReading() {
* @see books.persistence.types.Book#getGenders()
*/
@Override
- public List<Gender> getGenders() {
+ public Collection<Gender> getGenders() {
// TODO: Shouldn't an immutable list be returned?
return genders;
}
@@ -116,7 +117,7 @@ public int getPages() {
* @see books.persistence.types.Book#getPersons(books.persistence.types.PersonType)
*/
@Override
- public List<Person> getPersons(PersonType type) {
+ public Collection<Person> getPersons(PersonType type) {
// TODO Shouldn't this return an immutable list?
return persons;
}
@@ -133,7 +134,7 @@ public String getSeries() {
* @see books.persistence.types.Book#getSubTitles()
*/
@Override
- public Set<String> getSubTitles() {
+ public Collection<String> getSubTitles() {
// TODO Shouldn't this return an immutable list?
return subtitles;
}
View
5 persistence/books/berkeleydb/src/books/persistence/types/berkeleydb/PersonBerkeleyDB.java
@@ -23,6 +23,7 @@
*/
package books.persistence.types.berkeleydb;
+import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
@@ -98,7 +99,7 @@ public String getFullName() {
* @see books.persistence.types.Person#getLastNames()
*/
@Override
- public Set<String> getLastNames() {
+ public Collection<String> getLastNames() {
return lastnames ;
}
@@ -106,7 +107,7 @@ public String getFullName() {
* @see books.persistence.types.Person#getMiddleNames()
*/
@Override
- public Set<String> getMiddleNames() {
+ public Collection<String> getMiddleNames() {
return middlenames;
}
Please sign in to comment.
Something went wrong with that request. Please try again.