public void setTensorFormat(String value) {
        switch (value) {
            case "hex" :
                tensorHexDense = true;
                tensorShortForm = true;
                tensorDirectValues = false;
                break;
            case "hex-value" :
                tensorHexDense = true;
                tensorShortForm = true;
                tensorDirectValues = true;
                break;
            case "short" :
                tensorShortForm = true;
                tensorDirectValues = false;
                break;
            case "long" :
                tensorShortForm = false;
                tensorDirectValues = false;
                break;
            case "short-value" :
                tensorShortForm = true;
                tensorDirectValues = true;
                break;
            case "long-value" :
                tensorShortForm = false;
                tensorDirectValues = true;
                break;
            default : throw new IllegalArgumentException("Value must be 'long', 'short', 'long-value', or 'short-value', not '" + value + "'");
        };
    }
Sets whether tensors should use short form in JSON and textual representations from a string.

@param value a string which must be either 'short' or 'long'
@throws IllegalArgumentException if any other value is passed
container-search/src/main/java/com/yahoo/search/query/Presentation.java