MCPcopy Create free account
hub / github.com/MenoData/Time4J / from

Method from

base/src/main/java/net/time4j/PlainTime.java:1325–1339  ·  view source on GitHub ↗
(WallTime time)

Source from the content-addressed store, hash-verified

1323 * @return PlainTime
1324 */
1325 public static PlainTime from(WallTime time) {
1326
1327 if (time instanceof PlainTime) {
1328 return (PlainTime) time;
1329 } else if (time instanceof PlainTimestamp) {
1330 return ((PlainTimestamp) time).getWallTime();
1331 } else {
1332 return PlainTime.of(
1333 time.getHour(),
1334 time.getMinute(),
1335 time.getSecond(),
1336 time.getNanosecond());
1337 }
1338
1339 }
1340
1341 /**
1342 * <p>Short cut for {@code TemporalType.LOCAL_TIME.translate(time)}. </p>

Callers 4

createFromMethod · 0.95
betweenMethod · 0.95
sinceMethod · 0.95
untilMethod · 0.95

Calls 11

ofMethod · 0.95
floorModuloMethod · 0.95
getHourMethod · 0.65
getMinuteMethod · 0.65
getSecondMethod · 0.65
getNanosecondMethod · 0.65
translateMethod · 0.65
getPosixTimeMethod · 0.65
getWallTimeMethod · 0.45
getIntegralAmountMethod · 0.45
getFractionalAmountMethod · 0.45

Tested by

no test coverage detected