nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/arrays/ContinuousArrayData.java
changeset 26886 18c744ab4df2
parent 26768 751b0f427090
child 27104 bc8ce3f84b84
equal deleted inserted replaced
26786:f0c5e4b732da 26886:18c744ab4df2
    74     /**
    74     /**
    75      * Check if we can put one more element at the end of this continous
    75      * Check if we can put one more element at the end of this continous
    76      * array without reallocating, or if we are overwriting an already
    76      * array without reallocating, or if we are overwriting an already
    77      * allocated element
    77      * allocated element
    78      *
    78      *
    79      * @param index
    79      * @param index index to check
    80      * @return true if we don't need to do any array reallocation to fit an element at index
    80      * @return true if we don't need to do any array reallocation to fit an element at index
    81      */
    81      */
    82     public final boolean hasRoomFor(final int index) {
    82     public final boolean hasRoomFor(final int index) {
    83         return has(index) || (index == length() && ensure(index) == this);
    83         return has(index) || (index == length && ensure(index) == this);
    84     }
    84     }
    85 
    85 
    86     /**
    86     /**
    87      * Return element getter for a certain type at a certain program point
    87      * Return element getter for a certain type at a certain program point
    88      * @param returnType   return type
    88      * @param returnType   return type