< prev index next >

src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeString.java

Print this page

        

*** 208,225 **** } return super.get(key); } @Override - public Object get(final long key) { - if (key >= 0 && key < value.length()) { - return String.valueOf(value.charAt((int)key)); - } - return super.get(key); - } - - @Override public Object get(final int key) { if (key >= 0 && key < value.length()) { return String.valueOf(value.charAt(key)); } return super.get(key); --- 208,217 ----
*** 234,288 **** public int getInt(final double key, final int programPoint) { return JSType.toInt32MaybeOptimistic(get(key), programPoint); } @Override - public int getInt(final long key, final int programPoint) { - return JSType.toInt32MaybeOptimistic(get(key), programPoint); - } - - @Override public int getInt(final int key, final int programPoint) { return JSType.toInt32MaybeOptimistic(get(key), programPoint); } @Override - public long getLong(final Object key, final int programPoint) { - return JSType.toLongMaybeOptimistic(get(key), programPoint); - } - - @Override - public long getLong(final double key, final int programPoint) { - return JSType.toLongMaybeOptimistic(get(key), programPoint); - } - - @Override - public long getLong(final long key, final int programPoint) { - return JSType.toLongMaybeOptimistic(get(key), programPoint); - } - - @Override - public long getLong(final int key, final int programPoint) { - return JSType.toLongMaybeOptimistic(get(key), programPoint); - } - - @Override public double getDouble(final Object key, final int programPoint) { return JSType.toNumberMaybeOptimistic(get(key), programPoint); } @Override public double getDouble(final double key, final int programPoint) { return JSType.toNumberMaybeOptimistic(get(key), programPoint); } @Override - public double getDouble(final long key, final int programPoint) { - return JSType.toNumberMaybeOptimistic(get(key), programPoint); - } - - @Override public double getDouble(final int key, final int programPoint) { return JSType.toNumberMaybeOptimistic(get(key), programPoint); } @Override --- 226,250 ----
*** 296,311 **** public boolean has(final int key) { return isValidStringIndex(key) || super.has(key); } @Override - public boolean has(final long key) { - final int index = ArrayIndex.getArrayIndex(key); - return isValidStringIndex(index) || super.has(key); - } - - @Override public boolean has(final double key) { final int index = ArrayIndex.getArrayIndex(key); return isValidStringIndex(index) || super.has(key); } --- 258,267 ----
*** 320,335 **** public boolean hasOwnProperty(final int key) { return isValidStringIndex(key) || super.hasOwnProperty(key); } @Override - public boolean hasOwnProperty(final long key) { - final int index = ArrayIndex.getArrayIndex(key); - return isValidStringIndex(index) || super.hasOwnProperty(key); - } - - @Override public boolean hasOwnProperty(final double key) { final int index = ArrayIndex.getArrayIndex(key); return isValidStringIndex(index) || super.hasOwnProperty(key); } --- 276,285 ----
*** 337,352 **** public boolean delete(final int key, final boolean strict) { return checkDeleteIndex(key, strict)? false : super.delete(key, strict); } @Override - public boolean delete(final long key, final boolean strict) { - final int index = ArrayIndex.getArrayIndex(key); - return checkDeleteIndex(index, strict)? false : super.delete(key, strict); - } - - @Override public boolean delete(final double key, final boolean strict) { final int index = ArrayIndex.getArrayIndex(key); return checkDeleteIndex(index, strict)? false : super.delete(key, strict); } --- 287,296 ----
< prev index next >