java.lang.Math.decrementExact()方法的使用及代码示例

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

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

Math.decrementExact介绍

暂无

代码示例

代码示例来源:origin: neo4j/neo4j

  1. private int decrementActiveClients( int clientState )
  2. {
  3. return getStatus( clientState ) | Math.decrementExact( getActiveClients( clientState ) );
  4. }
  5. }

代码示例来源:origin: apache/sis

  1. /**
  2. * Creates a new {@code gco:UnlimitedInteger} for the given value.
  3. * A null value is interpreted as infinity (i.e. no bound).
  4. */
  5. UnlimitedInteger(Integer value, final boolean inclusive) {
  6. if (value == null) {
  7. isInfinite = Boolean.TRUE;
  8. } else {
  9. if (!inclusive) {
  10. value = Math.decrementExact(value);
  11. }
  12. this.value = value;
  13. }
  14. }

代码示例来源:origin: apache/sis

  1. /**
  2. * Creates an iterator for the given region in the given raster.
  3. *
  4. * @param input the raster which contains the sample values to read.
  5. * @param output the raster where to write the sample values, or {@code null} for read-only iterator.
  6. * @param subArea the raster region where to perform the iteration, or {@code null}
  7. * for iterating over all the raster domain.
  8. * @param window size of the window to use in {@link #createWindow(TransferType)} method, or {@code null} if none.
  9. */
  10. DefaultIterator(final Raster input, final WritableRaster output, final Rectangle subArea, final Dimension window) {
  11. super(input, output, subArea, window);
  12. currentLowerX = lowerX;
  13. currentUpperX = upperX;
  14. currentUpperY = upperY;
  15. x = Math.decrementExact(lowerX); // Set the position before first pixel.
  16. y = lowerY;
  17. }

代码示例来源:origin: apache/sis

  1. /**
  2. * Creates an iterator for the given region in the given image.
  3. *
  4. * @param input the image which contains the sample values to read.
  5. * @param output the image where to write the sample values, or {@code null} for read-only iterator.
  6. * @param subArea the image region where to perform the iteration, or {@code null}
  7. * for iterating over all the image domain.
  8. * @param window size of the window to use in {@link #createWindow(TransferType)} method, or {@code null} if none.
  9. */
  10. DefaultIterator(final RenderedImage input, final WritableRenderedImage output, final Rectangle subArea, final Dimension window) {
  11. super(input, output, subArea, window);
  12. tileX = Math.decrementExact(tileLowerX);
  13. tileY = tileLowerY;
  14. currentLowerX = lowerX;
  15. currentUpperX = lowerX; // Really 'lower', so the position is the tile before the first tile.
  16. currentUpperY = lowerY;
  17. x = Math.decrementExact(lowerX); // Set the position before first pixel.
  18. y = lowerY;
  19. }

代码示例来源:origin: org.neo4j/neo4j-kernel

  1. private int decrementActiveClients( int clientState )
  2. {
  3. return getStatus( clientState ) | Math.decrementExact( getActiveClients( clientState ) );
  4. }
  5. }

代码示例来源:origin: apache/sis

  1. high = Math.decrementExact(high);

代码示例来源:origin: apache/sis

  1. if (!isHighIncluded) {
  2. for (int i=dimension; i < coordinates.length; i++) {
  3. coordinates[i] = Math.decrementExact(coordinates[i]);

相关文章