implement WeightComponents::str()