Here you can find the source of getOrientationRequested(int value)
public static OrientationRequested getOrientationRequested(int value)
//package com.java2s; import javax.print.attribute.standard.OrientationRequested; public class Main { public static OrientationRequested getOrientationRequested(int value) { if (OrientationRequested.LANDSCAPE.getValue() == value) return OrientationRequested.LANDSCAPE; if (OrientationRequested.PORTRAIT.getValue() == value) return OrientationRequested.PORTRAIT; if (OrientationRequested.REVERSE_LANDSCAPE.getValue() == value) return OrientationRequested.REVERSE_LANDSCAPE; if (OrientationRequested.REVERSE_PORTRAIT.getValue() == value) return OrientationRequested.REVERSE_PORTRAIT; return OrientationRequested.LANDSCAPE; }/*from w ww.j a v a 2 s .c om*/ }