public void setDim(int dim, int value) {
    if (value < 0 || value >= shape[dim])  // check index here
      throw new ArrayIndexOutOfBoundsException();
    if (shape[dim] >= 0) //!vlen
      current[dim] = value;
  }
public void setDim(int dim, int value) {
    if (value < 0 || value >= shape[dim])  
      throw new ArrayIndexOutOfBoundsException();
    if (shape[dim] >= 0) 
      current[dim] = value;
  }
public void setDim ( int dim , int value ) { if ( value < 0 || value >= shape [ dim ] ) // check index here
 throw new ArrayIndexOutOfBoundsException ( ) ; if ( shape [ dim ] >= 0 ) //!vlen
 current [ dim ] = value ; }
set current element at dimension dim to v

@param dim   set this dimension
@param value to this value
set current element at dimension dim to v