/*
(non-Javadoc)

@see com.ibm.ws.objectManager.utils.NLS#format(java.lang.String)
515326
public String format(String key) {
        if (traceNLS != null) {
            return traceNLS.getString(key);
        } else {
            return key;
        }
    }
1008596
public String format(String json) {
        String result = null;
        if (json != null){
            if (json.startsWith("{")) {
                result = new JSONObject(json).toString(4);
            } else if (json.startsWith("[")) {
                JSONObject jsonObject = new JSONObject("{'a': " + json + "}");
                org.json.JSONArray array = (org.json.JSONArray) jsonObject.get("a");
                result = array.toString(4);
            }
        }
        return result;
    }
565481
@Override
	public StringBuffer format(final Object obj, final StringBuffer toAppendTo, final FieldPosition pos) {
		return toAppendTo.append(printer.format(obj));
	}
928768
public static String format(Date date, DateFormat format) {
		if (null == format || null == date) {
			return null;
		}
		return format.format(date);
	}
809603
@Override
    public StringBuffer format(java.math.BigDecimal number, StringBuffer result,
                               FieldPosition fieldPosition) {
        return format(number, result, fieldPosition, false);
    }
600431
public static String format(Object o, String pattern, Locale locale, String timezone) {
        if (null == o) return "";
        return format(null, o, pattern, locale, timezone);
    }
1291728
public final String format(long number) {
        StringBuffer buf = new StringBuffer(19);
        FieldPosition pos = new FieldPosition(0);
        format(number, buf, pos);
        return buf.toString();
    }
745641
function format( value ) {
      // value was wrapped in array for parsing:
      try {
         return value.map( function( item ) {
            return JSON.stringify( item, null, 3 ).replace( NEWLINE_MATCHER, '\n' );
         } ).join( ',\n' );
      }
      catch( e ) {
         // value not JSON-compatible
         return value;
      }
   }
1264588
public final String format(android.icu.math.BigDecimal number) {
        return format(number, new StringBuffer(),
                      new FieldPosition(0)).toString();
    }
652109
public void format(StringBuilder sb, Object value) {
		if (prefix != null) {
			sb.append(prefix);
		}
		if (percentExpression != null && value != null) {
			percentExpression.append(value, sb);
		}
		if (suffix != null) {
			sb.append(suffix);
		}
	}
809339
@Override
    public Object format(Object value) {
        if (value == null) {
            return nullStringValue;
        }
        if(value.getClass().isArray()) {
            return asList(value);
        } else if (value instanceof Date) {
           Date date = (Date) value;
           if (date.getTime() % ONE_DAY_IN_MILLIS == 0) {
               return new SimpleDateFormat(datePattern).format(date);
           } else {
               return new SimpleDateFormat(dateTimePattern).format(date);
           }
        } else if(value instanceof CompositeData) {
            return toMap((CompositeData)value);
        } else if(value instanceof Element) {
            return parseXmlElement((Element) value);
        }
        
        return value;
    }
1346393
String format(String pattern) {
        return String.format(pattern, this.domain, this.major, this.minor);
    }
481996
public static StringBuilder format (StringBuilder into, Object... args) {
    for (int ii = 0, ll = args.length/2; ii < ll; ii++) {
      if (ii > 0) into.append(", ");
      into.append(args[2*ii]).append("=").append(args[2*ii+1]);
    }
    return into;
  }
65303
public final void setFormat(String value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setFormat", value);
        jmo.getPayloadPart().setField(JsPayloadAccess.FORMAT, value);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setFormat");
    }
370660
@Override
  public String format(int index)
  {
    StringBuilder sb = new StringBuilder();
    final RomanNumeral[] values = RomanNumeral.values();
    for(int i = values.length - 1; i >= 0; i--) {
      while(index >= values[i].weight) {
        sb.append(values[i]);
        index -= values[i].weight;
      }
    }
    return sb.toString();
  }
416247
public static String format(final Object object, final String pattern) {
		if (object instanceof Date) {
			return JKFormatUtil.formatDate((Date) object, pattern);
		}
		if (object instanceof Time) {
			return JKFormatUtil.formatTime((Time) object, pattern);
		}
		if (object instanceof Timestamp) {
			return JKFormatUtil.formatTimeStamp((Timestamp) object, pattern);
		}
		if (object instanceof java.util.Date) {
			return JKFormatUtil.formatDate((java.util.Date) object, pattern);
		}
		if (object instanceof Double) {
			return JKFormatUtil.formatDouble((Double) object, pattern);
		}
		if (object != null) {
			return object.toString();
		}
		return null;
	}
627029
public static String format(final long time, final String format) {
		return format(time, DateTimeFormat.forPattern(format));
	}