private static void ensureValidOrientations ( Alignment horizontalAlignment , Alignment verticalAlignment ) { if ( ! horizontalAlignment . isHorizontal ( ) ) { throw new IllegalArgumentException ( "The horizontal alignment must be one of: left, center, right, fill, default." ) ; } if ( ! verticalAlignment . isVertical ( ) ) { throw new IllegalArgumentException ( "The vertical alignment must be one of: top, center, bottom, fill, default." ) ; } }
Checks and verifies that the horizontal alignment is a horizontal and the vertical alignment is vertical .