Example usage for java.time OffsetTime isSupported

List of usage examples for java.time OffsetTime isSupported

Introduction

In this page you can find the example usage for java.time OffsetTime isSupported.

Prototype

@Override 
public boolean isSupported(TemporalUnit unit) 

Source Link

Document

Checks if the specified unit is supported.

Usage

From source file:Main.java

public static void main(String[] args) {
    OffsetTime m = OffsetTime.now();
    boolean z = m.isSupported(ChronoUnit.HOURS);
    System.out.println(z);/*w w w  .java  2 s  . c  o m*/

}

From source file:Main.java

public static void main(String[] args) {
    OffsetTime m = OffsetTime.now();
    boolean z = m.isSupported(ChronoField.HOUR_OF_DAY);
    System.out.println(z);//from www  .j  a  v a 2  s . co  m

}