Package uk.ac.starlink.topcat
Class Count
java.lang.Object
uk.ac.starlink.topcat.Count
Utility class for handling positive integers.
Useful if you want to reference many instances of small values,
and not so many of large ones; this implementation
caches the small ones, and creates the large ones on demand.
- Since:
- 3 Feb 2015
- Author:
- Mark Taylor
-
Method Summary
-
Method Details
-
getValue
public abstract long getValue()Returns the numeric value of this count.- Returns:
- count value
-
getCount
Obtains an instance of this class for a given value.- Parameters:
lval
- value- Returns:
- instance
-
increment
Returns the next count instance in sequence. As a special case, an input null value is treated as a count with value zero.- Parameters:
in
- input value, or null- Returns:
- count for in+1
-