本文整理了Java中java.util.Formatter.transformFromNull()
方法的一些代码示例,展示了Formatter.transformFromNull()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Formatter.transformFromNull()
方法的具体详情如下:
包路径:java.util.Formatter
类名称:Formatter
方法名:transformFromNull
暂无
代码示例来源:origin: robovm/robovm
return transformFromNull();
代码示例来源:origin: robovm/robovm
private CharSequence transformFromDateTime() {
if (arg == null) {
return transformFromNull();
}
Calendar calendar;
if (arg instanceof Calendar) {
calendar = (Calendar) arg;
} else {
Date date = null;
if (arg instanceof Long) {
date = new Date(((Long) arg).longValue());
} else if (arg instanceof Date) {
date = (Date) arg;
} else {
throw badArgumentType();
}
calendar = Calendar.getInstance(locale);
calendar.setTime(date);
}
StringBuilder result = new StringBuilder();
if (!appendT(result, formatToken.getDateSuffix(), calendar)) {
throw formatToken.unknownFormatConversionException();
}
return padding(result, 0);
}
代码示例来源:origin: robovm/robovm
private CharSequence transformFromFloat() {
if (arg == null) {
return transformFromNull();
} else if (arg instanceof Float || arg instanceof Double) {
Number number = (Number) arg;
代码示例来源:origin: ibinti/bugvm
return transformFromNull();
代码示例来源:origin: MobiVM/robovm
return transformFromNull();
代码示例来源:origin: com.bugvm/bugvm-rt
return transformFromNull();
代码示例来源:origin: com.gluonhq/robovm-rt
return transformFromNull();
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
return transformFromNull();
代码示例来源:origin: FlexoVM/flexovm
return transformFromNull();
代码示例来源:origin: ibinti/bugvm
private CharSequence transformFromDateTime() {
if (arg == null) {
return transformFromNull();
}
Calendar calendar;
if (arg instanceof Calendar) {
calendar = (Calendar) arg;
} else {
Date date = null;
if (arg instanceof Long) {
date = new Date(((Long) arg).longValue());
} else if (arg instanceof Date) {
date = (Date) arg;
} else {
throw badArgumentType();
}
calendar = Calendar.getInstance(locale);
calendar.setTime(date);
}
StringBuilder result = new StringBuilder();
if (!appendT(result, formatToken.getDateSuffix(), calendar)) {
throw formatToken.unknownFormatConversionException();
}
return padding(result, 0);
}
代码示例来源:origin: MobiVM/robovm
private CharSequence transformFromDateTime() {
if (arg == null) {
return transformFromNull();
}
Calendar calendar;
if (arg instanceof Calendar) {
calendar = (Calendar) arg;
} else {
Date date = null;
if (arg instanceof Long) {
date = new Date(((Long) arg).longValue());
} else if (arg instanceof Date) {
date = (Date) arg;
} else {
throw badArgumentType();
}
calendar = Calendar.getInstance(locale);
calendar.setTime(date);
}
StringBuilder result = new StringBuilder();
if (!appendT(result, formatToken.getDateSuffix(), calendar)) {
throw formatToken.unknownFormatConversionException();
}
return padding(result, 0);
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
private CharSequence transformFromDateTime() {
if (arg == null) {
return transformFromNull();
}
Calendar calendar;
if (arg instanceof Calendar) {
calendar = (Calendar) arg;
} else {
Date date = null;
if (arg instanceof Long) {
date = new Date(((Long) arg).longValue());
} else if (arg instanceof Date) {
date = (Date) arg;
} else {
throw badArgumentType();
}
calendar = Calendar.getInstance(locale);
calendar.setTime(date);
}
StringBuilder result = new StringBuilder();
if (!appendT(result, formatToken.getDateSuffix(), calendar)) {
throw formatToken.unknownFormatConversionException();
}
return padding(result, 0);
}
代码示例来源:origin: com.bugvm/bugvm-rt
private CharSequence transformFromDateTime() {
if (arg == null) {
return transformFromNull();
}
Calendar calendar;
if (arg instanceof Calendar) {
calendar = (Calendar) arg;
} else {
Date date = null;
if (arg instanceof Long) {
date = new Date(((Long) arg).longValue());
} else if (arg instanceof Date) {
date = (Date) arg;
} else {
throw badArgumentType();
}
calendar = Calendar.getInstance(locale);
calendar.setTime(date);
}
StringBuilder result = new StringBuilder();
if (!appendT(result, formatToken.getDateSuffix(), calendar)) {
throw formatToken.unknownFormatConversionException();
}
return padding(result, 0);
}
代码示例来源:origin: com.gluonhq/robovm-rt
private CharSequence transformFromDateTime() {
if (arg == null) {
return transformFromNull();
}
Calendar calendar;
if (arg instanceof Calendar) {
calendar = (Calendar) arg;
} else {
Date date = null;
if (arg instanceof Long) {
date = new Date(((Long) arg).longValue());
} else if (arg instanceof Date) {
date = (Date) arg;
} else {
throw badArgumentType();
}
calendar = Calendar.getInstance(locale);
calendar.setTime(date);
}
StringBuilder result = new StringBuilder();
if (!appendT(result, formatToken.getDateSuffix(), calendar)) {
throw formatToken.unknownFormatConversionException();
}
return padding(result, 0);
}
代码示例来源:origin: FlexoVM/flexovm
private CharSequence transformFromDateTime() {
if (arg == null) {
return transformFromNull();
}
Calendar calendar;
if (arg instanceof Calendar) {
calendar = (Calendar) arg;
} else {
Date date = null;
if (arg instanceof Long) {
date = new Date(((Long) arg).longValue());
} else if (arg instanceof Date) {
date = (Date) arg;
} else {
throw badArgumentType();
}
calendar = Calendar.getInstance(locale);
calendar.setTime(date);
}
StringBuilder result = new StringBuilder();
if (!appendT(result, formatToken.getDateSuffix(), calendar)) {
throw formatToken.unknownFormatConversionException();
}
return padding(result, 0);
}
代码示例来源:origin: MobiVM/robovm
private CharSequence transformFromFloat() {
if (arg == null) {
return transformFromNull();
} else if (arg instanceof Float || arg instanceof Double) {
Number number = (Number) arg;
代码示例来源:origin: ibinti/bugvm
private CharSequence transformFromFloat() {
if (arg == null) {
return transformFromNull();
} else if (arg instanceof Float || arg instanceof Double) {
Number number = (Number) arg;
代码示例来源:origin: com.bugvm/bugvm-rt
private CharSequence transformFromFloat() {
if (arg == null) {
return transformFromNull();
} else if (arg instanceof Float || arg instanceof Double) {
Number number = (Number) arg;
代码示例来源:origin: com.gluonhq/robovm-rt
private CharSequence transformFromFloat() {
if (arg == null) {
return transformFromNull();
} else if (arg instanceof Float || arg instanceof Double) {
Number number = (Number) arg;
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
private CharSequence transformFromFloat() {
if (arg == null) {
return transformFromNull();
} else if (arg instanceof Float || arg instanceof Double) {
Number number = (Number) arg;
内容来源于网络,如有侵权,请联系作者删除!