| Package | jp.nium.version |
| Class | public class Version |
| Inheritance | Version Object |
| Property | Defined By | ||
|---|---|---|---|
| buildVersion : int [read-only]
ビルドバージョンを取得します。
Get the build version.
| Version | ||
| majorVersion : int [read-only]
メジャーバージョンを取得します。
Get the major version.
| Version | ||
| minorVersion : int [read-only]
マイナーバージョンを取得します。
Get the minor version.
| Version | ||
| release : String [read-only]
リリース情報を取得します。
Get the release information.
| Version | ||
| Method | Defined By | ||
|---|---|---|---|
Version(majorVersionOrVersionValue:*, minorVersion:int = 0, buildVersion:int = 0, release:String = null)
新しい Version インスタンスを作成します。
Creates a new Version object.
| Version | ||
Version インスタンスのコピーを作成して、各プロパティの値を元のプロパティの値と一致するように設定します。
Duplicates an instance of an Version subclass.
| Version | ||
対象の Version インスタンスを比較した結果を返します。
この比較結果にリリース情報の値は影響しません。
Returns the result of comparison of the Version instance. | Version | ||
2 つのバージョンをリリース情報も含めて完全に一致するかどうかを比較した結果を返します。
Returns the value above 1 if the own version is higher, returns 0 if the version is same and return the value below -1 if the own version is lower.
| Version | ||
toString():String
指定されたオブジェクトのストリング表現を返します。
Returns the string representation of the specified object.
| Version | ||
| buildVersion | property |
buildVersion:int [read-only] ビルドバージョンを取得します。 Get the build version.
public function get buildVersion():int| majorVersion | property |
majorVersion:int [read-only] メジャーバージョンを取得します。 Get the major version.
public function get majorVersion():int| minorVersion | property |
minorVersion:int [read-only] マイナーバージョンを取得します。 Get the minor version.
public function get minorVersion():int| release | property |
release:String [read-only] リリース情報を取得します。 Get the release information.
public function get release():String| Version | () | Constructor |
public function Version(majorVersionOrVersionValue:*, minorVersion:int = 0, buildVersion:int = 0, release:String = null)新しい Version インスタンスを作成します。 Creates a new Version object.
ParametersmajorVersionOrVersionValue:* — メジャーバージョン、またはバージョンを表すストリング値です。
The major version or the string value to express the version.
| |
minorVersion:int (default = 0) — マイナーバージョンです。
The minor version.
| |
buildVersion:int (default = 0) — ビルドバージョンです。
The build version.
| |
release:String (default = null) — リリース情報です。
The release information.
|
| clone | () | method |
public function clone():VersionVersion インスタンスのコピーを作成して、各プロパティの値を元のプロパティの値と一致するように設定します。 Duplicates an instance of an Version subclass.
ReturnsVersion —
元のオブジェクトと同じプロパティ値を含む新しい Version インスタンスです。
A new Version object that is identical to the original.
|
| compare | () | method |
public function compare(version:Version):int対象の Version インスタンスを比較した結果を返します。 この比較結果にリリース情報の値は影響しません。 Returns the result of comparison of the Version instance. The result of comparison do not affect to the value of release information.
Parameters
version:Version — 比較したい Version インスタンスです。
The Version instance to compare.
|
int —
自身のバージョンが高ければ 1 以上の数値を、バージョンが同じであれば 0 を、バージョンが低ければ -1 以下の数値です。
|
| equals | () | method |
public function equals(version:Version):Boolean2 つのバージョンをリリース情報も含めて完全に一致するかどうかを比較した結果を返します。 Returns the value above 1 if the own version is higher, returns 0 if the version is same and return the value below -1 if the own version is lower.
Parameters
version:Version — 比較したい Version インスタンスです。
The Version instance to compare.
|
Boolean —
完全に一致する場合には true を、一致しない場合には false です。
Returns true if completly same, otherwise return false.
|
| toString | () | method |
public function toString():String指定されたオブジェクトのストリング表現を返します。 Returns the string representation of the specified object.
ReturnsString —
オブジェクトのストリング表現です。
A string representation of the object.
|
ver version100:Version = new Version( 1, 0, 0 );
ver version200:Version = new Version( "2.0.0" );
trace( version100.compare( version200 ) ); // -3 を返す