本文整理了Java中java.util.Formatter.appendT()
方法的一些代码示例,展示了Formatter.appendT()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Formatter.appendT()
方法的具体详情如下:
包路径:java.util.Formatter
类名称:Formatter
方法名:appendT
暂无
代码示例来源: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
return true;
case 'D':
appendT(result, 'm', calendar);
result.append('/');
appendT(result, 'd', calendar);
result.append('/');
appendT(result, 'y', calendar);
return true;
case 'F':
appendT(result, 'Y', calendar);
result.append('-');
appendT(result, 'm', calendar);
result.append('-');
appendT(result, 'd', calendar);
return true;
case 'H':
return true;
case 'R':
appendT(result, 'H', calendar);
result.append(':');
appendT(result, 'M', calendar);
return true;
case 'S':
return true;
case 'T':
appendT(result, 'H', calendar);
result.append(':');
代码示例来源: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: MobiVM/robovm
return true;
case 'D':
appendT(result, 'm', calendar);
result.append('/');
appendT(result, 'd', calendar);
result.append('/');
appendT(result, 'y', calendar);
return true;
case 'F':
appendT(result, 'Y', calendar);
result.append('-');
appendT(result, 'm', calendar);
result.append('-');
appendT(result, 'd', calendar);
return true;
case 'H':
return true;
case 'R':
appendT(result, 'H', calendar);
result.append(':');
appendT(result, 'M', calendar);
return true;
case 'S':
return true;
case 'T':
appendT(result, 'H', calendar);
result.append(':');
代码示例来源: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: ibinti/bugvm
return true;
case 'D':
appendT(result, 'm', calendar);
result.append('/');
appendT(result, 'd', calendar);
result.append('/');
appendT(result, 'y', calendar);
return true;
case 'F':
appendT(result, 'Y', calendar);
result.append('-');
appendT(result, 'm', calendar);
result.append('-');
appendT(result, 'd', calendar);
return true;
case 'H':
return true;
case 'R':
appendT(result, 'H', calendar);
result.append(':');
appendT(result, 'M', calendar);
return true;
case 'S':
return true;
case 'T':
appendT(result, 'H', calendar);
result.append(':');
代码示例来源: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.bugvm/bugvm-rt
return true;
case 'D':
appendT(result, 'm', calendar);
result.append('/');
appendT(result, 'd', calendar);
result.append('/');
appendT(result, 'y', calendar);
return true;
case 'F':
appendT(result, 'Y', calendar);
result.append('-');
appendT(result, 'm', calendar);
result.append('-');
appendT(result, 'd', calendar);
return true;
case 'H':
return true;
case 'R':
appendT(result, 'H', calendar);
result.append(':');
appendT(result, 'M', calendar);
return true;
case 'S':
return true;
case 'T':
appendT(result, 'H', calendar);
result.append(':');
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
return true;
case 'D':
appendT(result, 'm', calendar);
result.append('/');
appendT(result, 'd', calendar);
result.append('/');
appendT(result, 'y', calendar);
return true;
case 'F':
appendT(result, 'Y', calendar);
result.append('-');
appendT(result, 'm', calendar);
result.append('-');
appendT(result, 'd', calendar);
return true;
case 'H':
return true;
case 'R':
appendT(result, 'H', calendar);
result.append(':');
appendT(result, 'M', calendar);
return true;
case 'S':
return true;
case 'T':
appendT(result, 'H', calendar);
result.append(':');
代码示例来源: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: com.gluonhq/robovm-rt
return true;
case 'D':
appendT(result, 'm', calendar);
result.append('/');
appendT(result, 'd', calendar);
result.append('/');
appendT(result, 'y', calendar);
return true;
case 'F':
appendT(result, 'Y', calendar);
result.append('-');
appendT(result, 'm', calendar);
result.append('-');
appendT(result, 'd', calendar);
return true;
case 'H':
return true;
case 'R':
appendT(result, 'H', calendar);
result.append(':');
appendT(result, 'M', calendar);
return true;
case 'S':
return true;
case 'T':
appendT(result, 'H', calendar);
result.append(':');
代码示例来源:origin: FlexoVM/flexovm
return true;
case 'D':
appendT(result, 'm', calendar);
result.append('/');
appendT(result, 'd', calendar);
result.append('/');
appendT(result, 'y', calendar);
return true;
case 'F':
appendT(result, 'Y', calendar);
result.append('-');
appendT(result, 'm', calendar);
result.append('-');
appendT(result, 'd', calendar);
return true;
case 'H':
return true;
case 'R':
appendT(result, 'H', calendar);
result.append(':');
appendT(result, 'M', calendar);
return true;
case 'S':
return true;
case 'T':
appendT(result, 'H', calendar);
result.append(':');
内容来源于网络,如有侵权,请联系作者删除!