Code example for AtomicLong

Methods: incrementAndGet

0
    private long lastFalsePositiveCount = 0L;
    private long lastTruePositiveCount = 0L;
 
    public void addFalsePositive() 
    { 
        falsePositiveCount.incrementAndGet();
    } 
 
    public void addTruePositive() 
    { 
        truePositiveCount.incrementAndGet();
    } 
 
    public long getFalsePositiveCount() 
    { 
        return falsePositiveCount.get();
    } 
 
    public long getRecentFalsePositiveCount() 
    { 
        long fpc = getFalsePositiveCount();