|
|
@ -43,20 +43,6 @@ public abstract class AbstractJsonProvider implements JsonProvider { |
|
|
|
return ((List) obj).get(idx); |
|
|
|
return ((List) obj).get(idx); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Extracts the last value from an array |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param obj an array |
|
|
|
|
|
|
|
* @return the entry at the given index |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public Object getLastElement(Object obj) { |
|
|
|
|
|
|
|
if (null != obj) { |
|
|
|
|
|
|
|
int len = this.length(obj); |
|
|
|
|
|
|
|
return getArrayIndex(obj, len-1); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public final Object getArrayIndex(Object obj, int idx, boolean unwrap){ |
|
|
|
public final Object getArrayIndex(Object obj, int idx, boolean unwrap){ |
|
|
|
return getArrayIndex(obj, idx); |
|
|
|
return getArrayIndex(obj, idx); |
|
|
|
} |
|
|
|
} |
|
|
|