/** * Creates a {@code NumberedTransactionId}. * <p/> * This constructor should be used if a {@code NumberedTransactionId} is needed and the transaction number is not * available, but the transactionId string is. * * @param chargingStationId the charging station's identifier. * @param protocol the protocol identifier. * @param transactionId the transaction id string (containing the number). * @throws NumberFormatException if the number cannot be extracted from {@code transactionId}. */ public NumberedTransactionId(ChargingStationId chargingStationId, String protocol, String transactionId) { this.chargingStationId = checkNotNull(chargingStationId); checkNotNull(protocol); checkArgument(!protocol.isEmpty()); this.protocol = protocol; checkNotNull(transactionId); checkArgument(!transactionId.isEmpty()); this.number = numberFromTransactionIdString(chargingStationId, protocol, transactionId); }