Assets with the same GUID are considered versions of the same asset. Assume you have the following versions of an asset:
String[] allVersions = asset.getVersions(); would return the following array: ["4.0..0.8", "4.0.0", "3", "2.12.6.1", "2.0.1", "1.1.16", "1.1", "1.0.1.0", "1.0.1", "1.0.0.1", "1.0.0.0"]
asset = session.getAsset(new AssetIdentification(GUID)); would return version 4.0.0.8
asset = session.getAsset(new AssetIdentification(GUID, "3*")); would return version 3
asset = session.getAsset(new AssetIdentification(GUID, "2.0.*")); would return version 2.0.1
asset = session.getAsset(new AssetIdentification(GUID, "1.0.0.*")); would return version 1.0.0.1
asset = session.getAsset(new AssetIdentification(GUID, "3.0*")); would throw an asset not found exception
Using the wildcard * in the createAsset methods will find the session.replaceAssetNewVersion(asset, "*"); would set the version to 4.0.0.9
session.replaceAssetNewVersion(asset, "2.*"); would set the version to 2.12.6.2
session.replaceAssetNewVersion(asset, "1.*"); would set the version to 1.1.17
session.replaceAssetNewVersion(asset, "1.0.1.*"); would set the version to 1.0.1.1
session.replaceAssetNewVersion(asset, "1.0.0.*"); would set the version to 1.0.0.2
session.replaceAssetNewVersion(asset, "3.*"); would set the version to 3.0
session.replaceAssetNewVersion(asset, "3.0.*"); would set the version to 3.0.0