Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*-
  * See the file LICENSE for redistribution information.
  *
  * Copyright (c) 2002, 2013 Oracle and/or its affiliates.  All rights reserved.
  *
  */
 
 
 package com.sleepycat.je.rep.utilint;
For stats where the min value in the range is zero, so that sums, averages, etc. based on positive ranges just work.
public class LongMinZeroStat extends LongMinStat {
    private static final long serialVersionUID = 1L;
    public LongMinZeroStat(StatGroup groupStatDefinition definition) {
        super(groupdefinition);
    }
    @Override
    public Long get() {
        Long value = super.get();
        return (value == .) ? 0 : value;
    }
New to GrepCode? Check out our FAQ X