benchmarks/sieve/src/main/java/org/apidesign/benchmark/sieve/Natural.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Sun, 24 Jan 2016 12:08:45 +0100
changeset 1854 826eb936c9a8
permissions -rw-r--r--
The sieve benchmark makes the testing more real than the fake matrix multiplication
jaroslav@1854
     1
/**
jaroslav@1854
     2
 * Back 2 Browser Bytecode Translator
jaroslav@1854
     3
 * Copyright (C) 2012-2015 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
jaroslav@1854
     4
 *
jaroslav@1854
     5
 * This program is free software: you can redistribute it and/or modify
jaroslav@1854
     6
 * it under the terms of the GNU General Public License as published by
jaroslav@1854
     7
 * the Free Software Foundation, version 2 of the License.
jaroslav@1854
     8
 *
jaroslav@1854
     9
 * This program is distributed in the hope that it will be useful,
jaroslav@1854
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
jaroslav@1854
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
jaroslav@1854
    12
 * GNU General Public License for more details.
jaroslav@1854
    13
 *
jaroslav@1854
    14
 * You should have received a copy of the GNU General Public License
jaroslav@1854
    15
 * along with this program. Look for COPYING file in the top folder.
jaroslav@1854
    16
 * If not, see http://opensource.org/licenses/GPL-2.0.
jaroslav@1854
    17
 */
jaroslav@1854
    18
package org.apidesign.benchmark.sieve;
jaroslav@1854
    19
jaroslav@1854
    20
final class Natural {
jaroslav@1854
    21
    private int cnt = 2;
jaroslav@1854
    22
jaroslav@1854
    23
    int next() {
jaroslav@1854
    24
        return cnt++;
jaroslav@1854
    25
    }
jaroslav@1854
    26
}