本文整理了Java中java.time.temporal.UnsupportedTemporalTypeException
类的一些代码示例,展示了UnsupportedTemporalTypeException
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。UnsupportedTemporalTypeException
类的具体详情如下:
包路径:java.time.temporal.UnsupportedTemporalTypeException
类名称:UnsupportedTemporalTypeException
[英]An exception that indicates a type is unsupported.
This class is intended for use in a single thread.
[中]表示不支持某个类型的异常。
####实施者规范
此类用于单个线程。
代码示例来源:origin: neo4j/neo4j
@Override
ZoneId getZoneId()
{
throw new UnsupportedTemporalTypeException( "Cannot get the timezone of" + this );
}
代码示例来源:origin: neo4j/neo4j
@Override
public final int get( TemporalField field )
{
int accessor;
try
{
accessor = temporal().get( field );
}
catch ( UnsupportedTemporalTypeException e )
{
throw new UnsupportedTemporalUnitException( e.getMessage(), e );
}
return accessor;
}
代码示例来源:origin: jtablesaw/tablesaw
throw new UnsupportedTemporalTypeException("Unit is too large to be used for truncation");
代码示例来源:origin: neo4j/neo4j
private static long assertValidUntil( Temporal from, Temporal to, TemporalUnit unit )
{
try
{
return from.until( to, unit );
}
catch ( UnsupportedTemporalTypeException e )
{
throw new UnsupportedTemporalUnitException( e.getMessage(), e );
}
catch ( DateTimeException e )
{
throw new InvalidValuesArgumentException( e.getMessage(), e );
}
}
代码示例来源:origin: jtablesaw/tablesaw
numberColumn.append(result); break;
default:
throw new UnsupportedTemporalTypeException("The ChronoUnit " + unit + " is not supported for timeWindows on times");
代码示例来源:origin: neo4j/neo4j
throw new UnsupportedTemporalUnitException( e.getMessage(), e );
代码示例来源:origin: jtablesaw/tablesaw
break;
default:
throw new UnsupportedTemporalTypeException("Type " + unit + " is not currently supported");
代码示例来源:origin: org.neo4j/neo4j-values
@Override
public final int get( TemporalField field )
{
int accessor;
try
{
accessor = temporal().get( field );
}
catch ( UnsupportedTemporalTypeException e )
{
throw new UnsupportedTemporalUnitException( e.getMessage(), e );
}
return accessor;
}
代码示例来源:origin: jtablesaw/tablesaw
break;
default:
throw new UnsupportedTemporalTypeException("Type " + unit + " is not currently supported");
代码示例来源:origin: org.neo4j/neo4j-values
private static long assertValidUntil( Temporal from, Temporal to, TemporalUnit unit )
{
try
{
return from.until( to, unit );
}
catch ( UnsupportedTemporalTypeException e )
{
throw new UnsupportedTemporalUnitException( e.getMessage(), e );
}
catch ( DateTimeException e )
{
throw new InvalidValuesArgumentException( e.getMessage(), e );
}
}
代码示例来源:origin: jtablesaw/tablesaw
break;
default:
throw new UnsupportedTemporalTypeException("Type " + unit + " is not currently supported");
代码示例来源:origin: jtablesaw/tablesaw
numberColumn.set(i, result); break;
default:
throw new UnsupportedTemporalTypeException("The ChronoUnit " + unit + " is not supported for timeWindows on dates");
代码示例来源:origin: jtablesaw/tablesaw
numberColumn.set(i, result); break;
default:
throw new UnsupportedTemporalTypeException("The ChronoUnit " + unit + " is not supported for timeWindows on dates");
代码示例来源:origin: org.neo4j/neo4j-values
@Override
ZoneId getZoneId()
{
throw new UnsupportedTemporalTypeException( "Cannot get the timezone of" + this );
}
代码示例来源:origin: com.github.seratch/java-time-backport
@Override
public long getLong(TemporalField field) {
throw new UnsupportedTemporalTypeException("Unsupported field: " + field);
}
@SuppressWarnings("unchecked")
代码示例来源:origin: com.github.seratch/java-time-backport
@Override
public long get(TemporalUnit unit) {
if (unit == YEARS) {
return years;
}
if (unit == MONTHS) {
return months;
}
if (unit == DAYS) {
return days;
}
throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit);
}
代码示例来源:origin: com.github.seratch/java-time-backport
@Override
public long get(TemporalUnit unit) {
if (unit == SECONDS) {
return seconds;
}
if (unit == NANOS) {
return nanos;
}
throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit);
}
代码示例来源:origin: com.github.seratch/java-time-backport
@Override
public long getLong(TemporalField field) {
throw new UnsupportedTemporalTypeException("Unsupported field: " + field);
}
@SuppressWarnings("unchecked")
代码示例来源:origin: com.datastax.oss/java-driver-core-shaded
@Override
public long get(TemporalUnit unit) {
if (unit == ChronoUnit.MONTHS) {
return months;
} else if (unit == ChronoUnit.DAYS) {
return days;
} else if (unit == ChronoUnit.NANOS) {
return nanoseconds;
} else {
throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit);
}
}
代码示例来源:origin: com.github.seratch/java-time-backport
@Override
public long get(TemporalUnit unit) {
if (unit == YEARS) {
return years;
}
if (unit == MONTHS) {
return months;
}
if (unit == DAYS) {
return days;
}
throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit);
}
内容来源于网络,如有侵权,请联系作者删除!