The Java API already provides a class for representing (host, port) pairs, including port number validations: http://docs.oracle.com/javase/7/docs/api/java/net/InetSocketAddress.html.
If possible, standard classes should be favoured over custom ones.