OptionToken.java
683 Bytes
package com.diligrp.cashier.assistant.pattern;
import com.diligrp.cashier.assistant.domain.SequenceKey;
import com.diligrp.cashier.assistant.exception.AssistantServiceException;
import com.diligrp.cashier.shared.ErrorCode;
public class OptionToken extends Token {
public OptionToken(String token) {
super(token);
}
public String getToken() {
return this.token;
}
@Override
Converter<SequenceKey> getConverter() {
throw new AssistantServiceException(ErrorCode.OPERATION_NOT_ALLOWED, "Not supported converter");
}
public String toString() {
return String.format("option(%s)", token);
}
}