class ValueStringFixed extends ValueString {

    private static final ValueStringFixed EMPTY = new ValueStringFixed("");

    protected ValueStringFixed(String value) {
        super(value);
    }

    private static String trimRight(String s) {
        int endIndex = s.length() - 1;
        int i = endIndex;
        while (i >= 0 && s.charAt(i) == ' ') {
            i--;
        }
        s = i == endIndex ? s : s.substring(0, i + 1);
        return s;
    }

    @Override
    public int getType() {
        return Value.STRING_FIXED;
    }

    /**
     * Get or create a fixed length string value for the given string.
     * Spaces at the end of the string will be removed.
     *
     * @param s the string
     * @return the value
     */
    public static ValueStringFixed get(String s) {<FILL_FUNCTION_BODY>}

    @Override
    protected ValueString getNew(String s) {
        return ValueStringFixed.get(s);
    }
}

        s = trimRight(s);
        if (s.length() == 0) {
            return EMPTY;
        }
        ValueStringFixed obj = new ValueStringFixed(StringUtils.cache(s));
        if (s.length() > SysProperties.OBJECT_CACHE_MAX_PER_ELEMENT_SIZE) {
            return obj;
        }
        return (ValueStringFixed) Value.cache(obj);
    
<methods>public com.lealone.db.value.Value convertPrecision(long, boolean) ,public boolean equals(java.lang.Object) ,public static com.lealone.db.value.ValueString get(java.lang.String) ,public static com.lealone.db.value.Value get(java.lang.String, boolean) ,public int getDisplaySize() ,public int getMemory() ,public java.lang.Object getObject() ,public long getPrecision() ,public java.lang.String getSQL() ,public java.lang.String getString() ,public int getType() ,public int hashCode() ,public void set(java.sql.PreparedStatement, int) throws java.sql.SQLException<variables>private static final com.lealone.db.value.ValueString EMPTY,public static final com.lealone.db.value.ValueString.StringDataType type,protected final non-sealed java.lang.String value