implementation of class barcode_numeric for numeric-only barcodes