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