private Collection < LibertyVersion > filterVersions ( Collection < LibertyVersion > minimumVersions , String version ) { LibertyVersion versionToMatch = LibertyVersion . valueOf ( version ) ; if ( versionToMatch == null ) { return minimumVersions ; } Collection < LibertyVersion > filteredVersions = new HashSet < LibertyVersion > ( ) ; for ( LibertyVersion versionToTest : minimumVersions ) { if ( versionToTest . matchesToMicros ( versionToMatch ) ) { filteredVersions . add ( versionToTest ) ; } } return filteredVersions ; }
This will filter the supplied versions to make sure they all have the same major minor and micro parts as the supplied version . This may return the original collection .