cern.colt.Arrays.trimToCapacity()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(6.3k)|赞(0)|评价(0)|浏览(79)

本文整理了Java中cern.colt.Arrays.trimToCapacity()方法的一些代码示例,展示了Arrays.trimToCapacity()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Arrays.trimToCapacity()方法的具体详情如下:
包路径:cern.colt.Arrays
类名称:Arrays
方法名:trimToCapacity

Arrays.trimToCapacity介绍

[英]Ensures that the specified array cannot hold more than maxCapacity elements. An application can use this operation to minimize array storage.

Returns the identical array if array.length <= maxCapacity. Otherwise, returns a new array with a length of maxCapacity containing the first maxCapacity elements of array.
[中]

代码示例

代码示例来源:origin: blazegraph/database

/**
 * Trims the capacity of the receiver to be the receiver's current 
 * size. Releases any superfluous internal memory. An application can use this operation to minimize the 
 * storage of the receiver.
 */
public void trimToSize() {
  elements = cern.colt.Arrays.trimToCapacity(elements,size());
}
}

代码示例来源:origin: blazegraph/database

/**
* Trims the capacity of the receiver to be the receiver's current 
* size. An application can use this operation to minimize the 
* storage of the receiver. 
*/
public void trimToSize() {
  elements = cern.colt.Arrays.trimToCapacity(elements,size());
}
}

代码示例来源:origin: com.blazegraph/colt

/**
 * Trims the capacity of the receiver to be the receiver's current 
 * size. Releases any superfluous internal memory. An application can use this operation to minimize the 
 * storage of the receiver.
 */
public void trimToSize() {
  elements = cern.colt.Arrays.trimToCapacity(elements,size());
}
}

代码示例来源:origin: org.nuiton.matrix/nuiton-matrix

/**
   * Trims the capacity of the receiver to be the receiver's current size.
   * Releases any superfluous internal memory. An application can use this
   * operation to minimize the storage of the receiver.
   */
  public void trimToSize() {
    elements = cern.colt.Arrays.trimToCapacity(elements, size());
  }
}

代码示例来源:origin: rwl/ParallelColt

/**
   * Trims the capacity of the receiver to be the receiver's current size.
   * Releases any superfluos internal memory. An application can use this
   * operation to minimize the storage of the receiver.
   */

  public void trimToSize() {
    elements = cern.colt.Arrays.trimToCapacity(elements, size());
  }
}

代码示例来源:origin: blazegraph/database

/**
 * Trims the capacity of the receiver to be the receiver's current 
 * size. Releases any superfluos internal memory. An application can use this operation to minimize the 
 * storage of the receiver.
 */
public void trimToSize() {
  elements = cern.colt.Arrays.trimToCapacity(elements,size());
}
}

代码示例来源:origin: blazegraph/database

/**
 * Trims the capacity of the receiver to be the receiver's current 
 * size. Releases any superfluos internal memory. An application can use this operation to minimize the 
 * storage of the receiver.
 */
public void trimToSize() {
  elements = cern.colt.Arrays.trimToCapacity(elements,size());
}
}

代码示例来源:origin: blazegraph/database

/**
 * Trims the capacity of the receiver to be the receiver's current 
 * size. Releases any superfluos internal memory. An application can use this operation to minimize the 
 * storage of the receiver.
 */
public void trimToSize() {
  elements = cern.colt.Arrays.trimToCapacity(elements,size());
}
}

代码示例来源:origin: blazegraph/database

/**
 * Trims the capacity of the receiver to be the receiver's current 
 * size. Releases any superfluos internal memory. An application can use this operation to minimize the 
 * storage of the receiver.
 */
public void trimToSize() {
  elements = cern.colt.Arrays.trimToCapacity(elements,size());
}
}

代码示例来源:origin: blazegraph/database

/**
 * Trims the capacity of the receiver to be the receiver's current 
 * size. Releases any superfluous internal memory. An application can use this operation to minimize the 
 * storage of the receiver.
 */
public void trimToSize() {
  elements = cern.colt.Arrays.trimToCapacity(elements,size());
}
}

代码示例来源:origin: blazegraph/database

/**
 * Trims the capacity of the receiver to be the receiver's current 
 * size. Releases any superfluos internal memory. An application can use this operation to minimize the 
 * storage of the receiver.
 */
public void trimToSize() {
  elements = cern.colt.Arrays.trimToCapacity(elements,size());
}
}

代码示例来源:origin: net.sourceforge.parallelcolt/parallelcolt

/**
   * Trims the capacity of the receiver to be the receiver's current size.
   * Releases any superfluous internal memory. An application can use this
   * operation to minimize the storage of the receiver.
   */

  public void trimToSize() {
    elements = cern.colt.Arrays.trimToCapacity(elements, size());
  }
}

代码示例来源:origin: com.blazegraph/colt

/**
 * Trims the capacity of the receiver to be the receiver's current 
 * size. Releases any superfluos internal memory. An application can use this operation to minimize the 
 * storage of the receiver.
 */
public void trimToSize() {
  elements = cern.colt.Arrays.trimToCapacity(elements,size());
}
}

代码示例来源:origin: com.blazegraph/colt

/**
 * Trims the capacity of the receiver to be the receiver's current 
 * size. Releases any superfluous internal memory. An application can use this operation to minimize the 
 * storage of the receiver.
 */
public void trimToSize() {
  elements = cern.colt.Arrays.trimToCapacity(elements,size());
}
}

代码示例来源:origin: org.nuiton.matrix/nuiton-matrix

/**
   * Trims the capacity of the receiver to be the receiver's current size.
   * Releases any superfluos internal memory. An application can use this
   * operation to minimize the storage of the receiver.
   */
  public void trimToSize() {
    elements = cern.colt.Arrays.trimToCapacity(elements, size());
  }
}

代码示例来源:origin: net.sourceforge.parallelcolt/parallelcolt

/**
   * Trims the capacity of the receiver to be the receiver's current size. An
   * application can use this operation to minimize the storage of the
   * receiver.
   */

  public void trimToSize() {
    elements = cern.colt.Arrays.trimToCapacity(elements, size());
  }
}

代码示例来源:origin: net.sourceforge.parallelcolt/parallelcolt

/**
   * Trims the capacity of the receiver to be the receiver's current size.
   * Releases any superfluos internal memory. An application can use this
   * operation to minimize the storage of the receiver.
   */

  public void trimToSize() {
    elements = cern.colt.Arrays.trimToCapacity(elements, size());
  }
}

代码示例来源:origin: net.sourceforge.parallelcolt/parallelcolt

/**
   * Trims the capacity of the receiver to be the receiver's current size.
   * Releases any superfluos internal memory. An application can use this
   * operation to minimize the storage of the receiver.
   */

  public void trimToSize() {
    elements = cern.colt.Arrays.trimToCapacity(elements, size());
  }
}

代码示例来源:origin: net.sourceforge.parallelcolt/parallelcolt

/**
   * Trims the capacity of the receiver to be the receiver's current size.
   * Releases any superfluos internal memory. An application can use this
   * operation to minimize the storage of the receiver.
   */

  public void trimToSize() {
    elements = cern.colt.Arrays.trimToCapacity(elements, size());
  }
}

代码示例来源:origin: net.sourceforge.parallelcolt/parallelcolt

/**
   * Trims the capacity of the receiver to be the receiver's current size.
   * Releases any superfluos internal memory. An application can use this
   * operation to minimize the storage of the receiver.
   */

  public void trimToSize() {
    elements = cern.colt.Arrays.trimToCapacity(elements, size());
  }
}

相关文章

微信公众号

最新文章

更多