Permalink
Browse files

added asObjSeq method

  • Loading branch information...
1 parent 30a7d10 commit 44e7c7da3527d955a8189a4e27e74abd73a814a4 @michelegonella committed Oct 30, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 zen-dataobject/src/main/java/com/nominanuda/dataobject/DataStructHelper.java
@@ -696,5 +696,10 @@ public DataArray parseArrayUtf8(InputStream json) {
public DataArray parseArray(String json) {
return parseArray(json, false);
}
+ //can lead to classcastexception in case it is not a dataobjectarray
+ @SuppressWarnings("unchecked")
+ public Iterable<DataObject> asObjSeq(DataArray arr) {
+ return (Iterable<DataObject>)(Iterable<?>)arr;
+ }
}

0 comments on commit 44e7c7d

Please sign in to comment.