class TwoDimTaskGenerator extends Generator {

    @Override public String calc(long globalID, Map<String, String> params) throws SeqsException {
        //check ID
        String prefixValue = params.get(prefix);
        if (Objects.isNull(prefixValue))
            throw new SeqsException(prefix);
        String taskId;
        if (prefixValue.length() < 27)
            taskId = prefixValue.substring(0, prefixValue.length());
        else
            taskId = prefixValue.substring(0, 27);

        String firstDimValue = params.get(firstDim);
        if (Objects.isNull(firstDimValue)) {
            throw new SeqsException(firstDim);
        }
        String secondDimValue = params.get(secondDim);
        if (Objects.isNull(secondDimValue)) {
            throw new SeqsException(secondDim);
        }
        long firstDimHash = getHashCode(firstDimValue);
        long secondDimHash = getHashCode(secondDimValue);
        long hashNum = (firstDimHash << 10) | secondDimHash;
        String fixedHex = Long.toHexString(hashNum);
        while (fixedHex.length() < HASH_LENGTH) {
            fixedHex = "0" + fixedHex;
        }
        taskId = taskId + fixedHex;
        return taskId.toLowerCase();
    }

    public  TwoDimTaskGenerator(String prefix, String firstDim, String secondDim);

}