nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/arrays/TypedArrayData.java
equal
deleted
inserted
replaced
52 super(elementLength); //TODO is this right? |
52 super(elementLength); //TODO is this right? |
53 this.nb = nb; |
53 this.nb = nb; |
54 } |
54 } |
55 |
55 |
56 /** |
56 /** |
57 * Length in elements. Accessed from {@code ArrayBufferView} |
57 * Length in number of elements. Accessed from {@code ArrayBufferView} |
58 * @return element length |
58 * @return element length |
59 */ |
59 */ |
60 public final int getElementLength() { |
60 public final int getElementLength() { |
61 return (int)length(); |
61 return (int)length; |
62 } |
62 } |
63 |
63 |
64 /** |
64 /** |
65 * Is this an unsigned array data? |
65 * Is this an unsigned array data? |
66 * @return true if unsigned |
66 * @return true if unsigned |
117 throw new UnsupportedOperationException(); |
117 throw new UnsupportedOperationException(); |
118 } |
118 } |
119 |
119 |
120 @Override |
120 @Override |
121 public final boolean has(final int index) { |
121 public final boolean has(final int index) { |
122 return 0 <= index && index < length(); |
122 return 0 <= index && index < length; |
123 } |
123 } |
124 |
124 |
125 @Override |
125 @Override |
126 public ArrayData delete(final int index) { |
126 public ArrayData delete(final int index) { |
127 return this; |
127 return this; |