A Simple Helper object to String

@return a value.toString() or null
426544
public String getAsString(String key) {
		Object obj = this.get(key);
		if (obj == null)
			return null;
		return obj.toString();
	}
849427
protected String getStringValue(){
		if(type==VALUE_NULL){
			return null;
		}else if(!(type==VALUE_ESTRING||type==EFIELD)){
			if(dirty){
				return dirtyBuf.substring(startIndex,endIndex);
			}
			return new String(cbuf,startIndex,endIndex-startIndex);
		}else{
			StringBuilder buf=new StringBuilder(endIndex-startIndex);
			if(dirty){
				for(int i=startIndex;i<endIndex;i++){
					char c=dirtyBuf.charAt(i);
					if(c=='\\'){
						i++;
						c=dirtyBuf.charAt(i);
						if(c=='"' || c=='\\' || c=='/'){
							buf.append(c);
						}else if(c=='b'){
							buf.append('\b');
						}else if(c=='f'){
							buf.append('\f');
						}else if(c=='n'){
							buf.append('\n');
						}else if(c=='r'){
							buf.append('\r');
						}else if(c=='t'){
							buf.append('\t');
						}else if(c=='u'){
							String code=dirtyBuf.substring(i+1,i+5);
							buf.append((char)Integer.parseInt(code, 16));
							i+=4;
						}
					}else{
						buf.append(c);
					}
				}
			}else{
				for(int i=startIndex;i<endIndex;i++){
					char c=cbuf[i];
					if(c=='\\'){
						i++;
						c=cbuf[i];
						if(c=='"' || c=='\\' || c=='/'){
							buf.append(c);
						}else if(c=='b'){
							buf.append('\b');
						}else if(c=='f'){
							buf.append('\f');
						}else if(c=='n'){
							buf.append('\n');
						}else if(c=='r'){
							buf.append('\r');
						}else if(c=='t'){
							buf.append('\t');
						}else if(c=='u'){
							String code=new String(cbuf,i+1,4);
							buf.append((char)Integer.parseInt(code, 16));
							i+=4;
						}
					}else{
						buf.append(c);
					}
				}
			}
			return buf.toString();
		}
	}
671216
public static String toStr(Object value, String defaultValue) {
		return convert(String.class, value, defaultValue);
	}
618933
String getFormatted() {
        StringBuilder str = new StringBuilder();
        str.append(this.propertyName);
        str.append(this.valueComparator.getComparatorString());
        if (this.value != null) {
            str.append(this.value.getFormatted());
        } else {
            str.append("null");
        }
        return str.toString();
    }
646345
public String str()
  {
    int node = item(0);
    return (node != DTM.NULL) ? getStringFromNode(node).toString() : "";   
  }
146791
public String toJSONString() {
    return JSON.toJSONString(this, ObjectValueFilter.instance,
          SerializerFeature.WriteClassName,
          SerializerFeature.DisableCircularReferenceDetect);
  }
1075818
@Override
    protected String convertToString(Object value) throws Throwable {
		Rating rating = (Rating) value;
		return String.valueOf(rating.getRating());
    }
464587
public String str()
  {
    if(null == m_strCache)
      m_strCache = new String((char[])m_obj, m_start, m_length);
    
    return m_strCache;
  }
1296851
public String throwableToString() {
        StringBuilder sb = new StringBuilder("Exception:  ");
        if (throwable != null)
            sb.append(throwable.toString());
        else
            sb.append("null");
        sb.append("\n");
        return sb.toString();
    }
426971
String convertToString(Object value) {
        if (value == null) {
            return null;
        } else if (value instanceof String) {
            return (String) value;
        } else if (value instanceof List) {
            List<?> list = ((List<?>) value);
            if (list.size() == 0) {
                return EvaluationContext.EMPTY_STRING;
            } else if (list.size() == 1) {
                String strValue = String.valueOf(list.get(0));
                return escapeValue(strValue);
            } else {
                StringBuilder builder = new StringBuilder();
                Iterator<?> iterator = list.iterator();
                while (iterator.hasNext()) {
                    String strValue = String.valueOf(iterator.next());
                    strValue = escapeValue(strValue);
                    builder.append(strValue);
                    if (iterator.hasNext()) {
                        builder.append(", ");
                    }
                }
                return builder.toString();
            }
        } else if (value instanceof String[]) {
            String[] array = (String[]) value;
            if (array.length == 0) {
                return EvaluationContext.EMPTY_STRING;
            } else if (array.length == 1) {
                return escapeValue(array[0]);
            } else {
                StringBuilder builder = new StringBuilder();
                for (int i = 0; i < array.length; i++) {
                    String strValue = escapeValue(array[i]);
                    builder.append(strValue);
                    if (i + 1 < array.length) {
                        builder.append(", ");
                    }
                }
                return builder.toString();
            }
        } else if (value.getClass().isArray()) {
            int size = Array.getLength(value);
            if (size == 0) {
                return EvaluationContext.EMPTY_STRING;
            } else if (size == 1) {
                String strValue = String.valueOf(Array.get(value, 0));
                return escapeValue(strValue);
            } else {
                StringBuilder builder = new StringBuilder();
                for (int i = 0; i < size; i++) {
                    String strValue = String.valueOf(Array.get(value, i));
                    strValue = escapeValue(strValue);
                    builder.append(strValue);
                    if (i + 1 < size) {
                        builder.append(", ");
                    }
                }
                return builder.toString();
            }
        } else {
            return value.toString();
        }
    }
327049
@Override
    protected String convertToString(Object value) throws Throwable {
		Email email = (Email) value;
		return email.getEmail();
    }
227047
@Override
    protected String convertToString(Object value) throws Throwable {
		PhoneNumber number = (PhoneNumber) value; 
		return number.getNumber();
    }
1305649
@Override
	public String getValueAsString() {
		String result = null;

		String[] inputs = getValue();

		if (inputs != null && inputs.length > 0) {
			StringBuffer stringValues = new StringBuffer();

			for (int i = 0; i < inputs.length; i++) {
				if (i > 0) {
					stringValues.append(", ");
				}

				stringValues.append(inputs[i]);
			}

			result = stringValues.toString();

		}

		return result;
	}
334168
public String getString()
    {
        Object objValue = null;
        if (this.getMessage() != null)
            objValue = this.getMessage().getNative(this.getFullKey(null));
        Class<?> classData = this.getRawClassType();
        try {
            return DataConverters.formatObjectToString(objValue, classData, this.getDefault());
        } catch (Exception ex) {
            return null;
        }
    }
835937
public static String typeString(Object value) {
        return null == value || Primitive.NULL == value
            ? "null"
            : value instanceof Primitive
                ? ((Primitive) value).getType().getSimpleName()
                : typeString(value.getClass());
    }
717149
public static String getString(Object from, Field field)
    {
        PropertyAccessor<?> accessor = PropertyAccessorFactory.getPropertyAccessor(field);
        Object object = getObject(from, field);
        return object != null ? accessor.toString(object) : null;
    }
849183
public static final Function<Short,String> toStr() {
        return (Function<Short,String>)((Function)FnNumber.toStr());
    }