Package uk.ac.starlink.topcat
Class Count
- java.lang.Object
-
- uk.ac.starlink.topcat.Count
-
public abstract class Count extends java.lang.ObjectUtility 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
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static CountgetCount(long lval)Obtains an instance of this class for a given value.abstract longgetValue()Returns the numeric value of this count.static Countincrement(Count in)Returns the next count instance in sequence.
-
-
-
Method Detail
-
getValue
public abstract long getValue()
Returns the numeric value of this count.- Returns:
- count value
-
getCount
public static Count getCount(long lval)
Obtains an instance of this class for a given value.- Parameters:
lval- value- Returns:
- instance
-
-