Permalink
Browse files

Make getMetadata method private and expose other more higher level me…

…thods.
  • Loading branch information...
1 parent 151806b commit d2ed65b7f51daabe10e2cfa6eb42f1e530494ce0 @Kami Kami committed with gdusbabek Mar 26, 2013
@@ -22,7 +22,23 @@
public abstract class Container {
private Map<String, Object> metadata;
- public Map<String, Object> getMetadata() {
- return metadata;
+ public Integer getCount() {
+ return Integer.parseInt(this.metadata.get("count").toString());
+ }
+
+ public Integer getLimit() {
+ return Integer.parseInt(this.metadata.get("limit").toString());
+ }
+
+ public String getMarker() {
+ return this.metadata.get("marker").toString();
+ }
+
+ public String getNextMarker() {
+ return this.metadata.get("next_marker").toString();
+ }
+
+ private Map<String, Object> getMetadata() {
+ return this.metadata;
}
}

0 comments on commit d2ed65b

Please sign in to comment.