diff options
author | AviZi <avi.ziv@amdocs.com> | 2017-06-09 02:39:56 +0300 |
---|---|---|
committer | AviZi <avi.ziv@amdocs.com> | 2017-06-09 02:39:56 +0300 |
commit | 280f8015d06af1f41a3ef12e8300801c7a5e0d54 (patch) | |
tree | 9c1d3978c04cd28068f02073038c936bb49ca9e0 /openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/wrappers/GenericCollectionWrapper.java | |
parent | fd3821dad11780d33c5373d74c957c442489945e (diff) |
[SDC-29] Amdocs OnBoard 1707 initial commit.
Change-Id: Ie4d12a3f574008b792899b368a0902a8b46b5370
Signed-off-by: AviZi <avi.ziv@amdocs.com>
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/wrappers/GenericCollectionWrapper.java')
-rw-r--r-- | openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/wrappers/GenericCollectionWrapper.java | 34 |
1 files changed, 3 insertions, 31 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/wrappers/GenericCollectionWrapper.java b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/wrappers/GenericCollectionWrapper.java index b8d47e4ef3..22ce0a4e45 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/wrappers/GenericCollectionWrapper.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/openecomp-sdc-common-rest/src/main/java/org/openecomp/sdcrests/wrappers/GenericCollectionWrapper.java @@ -24,20 +24,12 @@ import java.io.Serializable; import java.util.ArrayList; import java.util.List; -/** - * This class represents a generic collection wrapper to be used by paginated results. - * - * @param <T> the type parameter - */ public class GenericCollectionWrapper<T> implements Serializable { private static final long serialVersionUID = 1L; private List<T> results; private int listCount; - /** - * Instantiates a new Generic collection wrapper. - */ public GenericCollectionWrapper() { this.results = new ArrayList<>(); } @@ -55,38 +47,18 @@ public class GenericCollectionWrapper<T> implements Serializable { } } - /** - * Gets results. - * - * @return the results - */ public List<T> getResults() { return results; } - /** - * Sets results. - * - * @param results the results - */ public void setResults(List<T> results) { this.results = results; } - /** - * Gets list count. - * - * @return the list count - */ public int getListCount() { return listCount; } - /** - * Sets list count. - * - * @param listCount the list count - */ public void setListCount(int listCount) { this.listCount = listCount; } @@ -94,11 +66,11 @@ public class GenericCollectionWrapper<T> implements Serializable { /** * Add boolean. * - * @param e0 the e 0 + * @param item the list item * @return the boolean */ - public boolean add(T e0) { - if (this.getResults().add(e0)) { + public boolean add(T item) { + if (this.getResults().add(item)) { this.setListCount(this.getResults().size()); return true; } |