public class StringCounter
extends java.lang.Object
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 and Description |
---|
StringCounter() |
Modifier and Type | Method and Description |
---|---|
void |
count(java.lang.String s)
Count this occurrence.
|
java.util.Map<java.lang.String,java.lang.Integer> |
top(int n)
Report the top
n counts. |
void |
top(int n,
java.io.PrintStream out)
Report the top n counts.
|
public void count(java.lang.String s)
s
- to countpublic java.util.Map<java.lang.String,java.lang.Integer> top(int n)
n
counts.n
- number of counts to retrieven
strings.public void top(int n, java.io.PrintStream out)