Package org.python.core.util
Class StringCounter
java.lang.Object
org.python.core.util.StringCounter
Not for application use, this class may be used to count how many times a
String
occurs a point in the runtime. We use this to investigate optimisations of the handling of
strings in the runtime, principally to avoid checks for byte-nature where that is already known.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
StringCounter
public StringCounter()
-
-
Method Details
-
count
Count this occurrence.- Parameters:
s- to count
-
top
Report the topncounts.- Parameters:
n- number of counts to retrieve- Returns:
- counts of the top
nstrings.
-
top
Report the top n counts.
-