code: double getWeight(Token tok) {
  		Double f = (Double)weightMap.get(tok);
  		return f==null ? 0 : f.doubleValue();
  	}
docs: Weight associated with a token: by default, the number of times
  the token appears in the bag.