private CounterPBImpl convertFromProtoFormat(CounterProto p) { return new CounterPBImpl(p); }
private CounterProto convertToProtoFormat(Counter t) { return ((CounterPBImpl)t).getProto(); }
public CounterPBImpl() { builder = CounterProto.newBuilder(); }
public CounterPBImpl(CounterProto proto) { this.proto = proto; viaProto = true; }
public CounterProto getProto() { proto = viaProto ? proto : builder.build(); viaProto = true; return proto; }
private void maybeInitBuilder() { if (viaProto || builder == null) { builder = CounterProto.newBuilder(proto); } viaProto = false; }