APISonar


org.dmg.pmml.DataType.TIME

> org > dmg > pmml > DataType > TIME
org APIs dmg APIs pmml APIs DataType APIs TIME APIs

Example 1
public void parseTime(){
		LocalTime time = (LocalTime)TypeUtil.parse(DataType.TIME, TIME);

		assertEquals(DataType.TIME, TypeUtil.getDataType(time));
	}
Example 2
private LocalTime toTime(Object value){

		if(value instanceof LocalTime){
			return (LocalTime)value;
		} else

		if(value instanceof LocalDateTime){
			LocalDateTime instant = (LocalDateTime)value;

			return instant.toLocalTime();
		}

		throw new TypeCheckException(DataType.TIME, value);
	}