HPInc / jipp

A Java-compatible implementation of IPP
MIT License
153 stars 42 forks source link

Compactify toString output for collection types #28

Closed GladeDiviney closed 4 years ago

GladeDiviney commented 6 years ago

Collection types such as MediaCol contain many optional fields. But they all print in the `toString() representation:

MediaCol(mediaBackCoating=null, mediaBottomMargin=330, mediaColor=null, mediaFrontCoating=null, mediaGrain=null, mediaHoleCount=null, mediaInfo=null, mediaKey=null, mediaLeftMargin=330, mediaOrderCount=null, mediaPrePrinted=null, mediaRecycled=null, mediaRightMargin=330, mediaSize=MediaSize(xDimension=21590, yDimension=27940), mediaSizeName=null, mediaSource=main, mediaSourceProperties=null, mediaThickness=null, mediaTooth=null, mediaTopMargin=330, mediaType=stationery, mediaWeightMetric=null)

Consider overriding toString with a version that skips null fields.