public static Version valueOf ( String version ) throws IllegalArgumentException { NullArgumentException . checkNotNull ( version , "version" ) ; int dot1Pos = version . indexOf ( ' ' ) ; if ( dot1Pos == - 1 ) throw new IllegalArgumentException ( version ) ; int dot2Pos = version . indexOf ( ' ' , dot1Pos + 1 ) ; if ( dot2Pos == - 1 ) throw new IllegalArgumentException ( version ) ; int dot3Pos = version . indexOf ( ' ' , dot2Pos + 1 ) ; if ( dot3Pos == - 1 ) throw new IllegalArgumentException ( version ) ; return getInstance ( Integer . parseInt ( version . substring ( 0 , dot1Pos ) ) , Integer . parseInt ( version . substring ( dot1Pos + 1 , dot2Pos ) ) , Integer . parseInt ( version . substring ( dot2Pos + 1 , dot3Pos ) ) , Integer . parseInt ( version . substring ( dot3Pos + 1 ) ) ) ; }
Parses a version number from its string representation .