That's perfectly fine then - constraints are constraints after all. The only thing I would add then is that you might want to adhere to the
Java Coding Convention. Often people will transfer coding conventions from other languages or use their own ad-hoc style. For instance, you seem to be using a variety of C-style, where the curly-braces appear below the section of code they belong to. In Java, the opening brace occurs on the same line of code that begins the statement (for example, an "if" or "for"). Also, even single-line "if" statements should really use { }.
Of particular note is the
statement section. While it might seem kinda uptight and annoying to harp on style, it really pays off in the long run when you need someone else to sort through a few thousand lines of code - little quirks in style can quickly become annoyances to someone who doesn't share your style.