Java Code Examples for jdk.nashorn.internal.runtime.arrays.ArrayData#getLong()
The following examples show how to use
jdk.nashorn.internal.runtime.arrays.ArrayData#getLong() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ScriptObject.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
@Override public long getLong(final Object key, final int programPoint) { final Object primitiveKey = JSType.toPrimitive(key, String.class); final int index = getArrayIndex(primitiveKey); final ArrayData array = getArray(); if (array.has(index)) { return isValid(programPoint) ? array.getLongOptimistic(index, programPoint) : array.getLong(index); } return getLong(index, JSType.toString(primitiveKey), programPoint); }
Example 2
Source File: ScriptObject.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
@Override public long getLong(final double key, final int programPoint) { final int index = getArrayIndex(key); final ArrayData array = getArray(); if (array.has(index)) { return isValid(programPoint) ? array.getLongOptimistic(index, programPoint) : array.getLong(index); } return getLong(index, JSType.toString(key), programPoint); }
Example 3
Source File: ScriptObject.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
@Override public long getLong(final long key, final int programPoint) { final int index = getArrayIndex(key); final ArrayData array = getArray(); if (array.has(index)) { return isValid(programPoint) ? array.getLongOptimistic(index, programPoint) : array.getLong(index); } return getLong(index, JSType.toString(key), programPoint); }
Example 4
Source File: ScriptObject.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
@Override public long getLong(final int key, final int programPoint) { final int index = getArrayIndex(key); final ArrayData array = getArray(); if (array.has(index)) { return isValid(programPoint) ? array.getLongOptimistic(key, programPoint) : array.getLong(key); } return getLong(index, JSType.toString(key), programPoint); }
Example 5
Source File: ScriptObject.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@Override public long getLong(final Object key) { final Object primitiveKey = JSType.toPrimitive(key, String.class); final int index = getArrayIndex(primitiveKey); final ArrayData array = getArray(); if (array.has(index)) { return array.getLong(index); } return getLong(index, JSType.toString(primitiveKey)); }
Example 6
Source File: ScriptObject.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@Override public long getLong(final double key) { final int index = getArrayIndex(key); final ArrayData array = getArray(); if (array.has(index)) { return array.getLong(index); } return getLong(index, JSType.toString(key)); }
Example 7
Source File: ScriptObject.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@Override public long getLong(final long key) { final int index = getArrayIndex(key); final ArrayData array = getArray(); if (array.has(index)) { return array.getLong(index); } return getLong(index, JSType.toString(key)); }
Example 8
Source File: ScriptObject.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@Override public long getLong(final int key) { final int index = getArrayIndex(key); final ArrayData array = getArray(); if (array.has(index)) { return array.getLong(index); } return getLong(index, JSType.toString(key)); }
Example 9
Source File: ScriptObject.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
@Override public long getLong(final Object key) { final Object primitiveKey = JSType.toPrimitive(key, String.class); final int index = getArrayIndex(primitiveKey); final ArrayData array = getArray(); if (array.has(index)) { return array.getLong(index); } return getLong(index, JSType.toString(primitiveKey)); }
Example 10
Source File: ScriptObject.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
@Override public long getLong(final double key) { final int index = getArrayIndex(key); final ArrayData array = getArray(); if (array.has(index)) { return array.getLong(index); } return getLong(index, JSType.toString(key)); }
Example 11
Source File: ScriptObject.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
@Override public long getLong(final long key) { final int index = getArrayIndex(key); final ArrayData array = getArray(); if (array.has(index)) { return array.getLong(index); } return getLong(index, JSType.toString(key)); }
Example 12
Source File: ScriptObject.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
@Override public long getLong(final int key) { final int index = getArrayIndex(key); final ArrayData array = getArray(); if (array.has(index)) { return array.getLong(index); } return getLong(index, JSType.toString(key)); }
Example 13
Source File: ScriptObject.java From nashorn with GNU General Public License v2.0 | 5 votes |
@Override public long getLong(final Object key) { final int index = ArrayIndex.getArrayIndex(key); final ArrayData array = getArray(); if (array.has(index)) { return array.getLong(index); } return getLong(index, JSType.toString(key)); }
Example 14
Source File: ScriptObject.java From nashorn with GNU General Public License v2.0 | 5 votes |
@Override public long getLong(final double key) { final int index = ArrayIndex.getArrayIndex(key); final ArrayData array = getArray(); if (array.has(index)) { return array.getLong(index); } return getLong(index, JSType.toString(key)); }
Example 15
Source File: ScriptObject.java From nashorn with GNU General Public License v2.0 | 5 votes |
@Override public long getLong(final long key) { final int index = ArrayIndex.getArrayIndex(key); final ArrayData array = getArray(); if (array.has(index)) { return array.getLong(index); } return getLong(index, JSType.toString(key)); }
Example 16
Source File: ScriptObject.java From nashorn with GNU General Public License v2.0 | 5 votes |
@Override public long getLong(final int key) { final ArrayData array = getArray(); if (array.has(key)) { return array.getLong(key); } return getLong(key, JSType.toString(key)); }