Example #1
0
 @Override
 public Object[] getIds() {
   return data.getCompound().keySet().toArray();
 }
Example #2
0
 @Override
 public boolean has(int index, Scriptable start) {
   return data.getArray().size() > index;
 }
Example #3
0
 @Override
 public boolean has(String name, Scriptable start) {
   return data.hasKey(name);
 }
Example #4
0
 @Override
 public Object get(int index, Scriptable start) {
   if (data.getArray().size() > index) return unwrap(data.item(index));
   return NOT_FOUND;
 }
Example #5
0
 @Override
 public Object get(String name, Scriptable start) {
   if (data.hasKey(name)) return unwrap(data.at(name));
   return NOT_FOUND;
 }
Example #6
0
 public Object unwrap(Data data) {
   if (data.getAtom().length() > 0) {
     return data.getAtom();
   }
   return new ECMAData(data);
 }