Asterisk-Java

org.asteriskjava
Class AsteriskVersion

java.lang.Object
  extended by org.asteriskjava.AsteriskVersion
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<AsteriskVersion>

public class AsteriskVersion
extends java.lang.Object
implements java.lang.Comparable<AsteriskVersion>, java.io.Serializable

Represents the version of an Asterisk server.

Since:
0.2
Version:
$Id: AsteriskVersion.java 1087 2008-08-08 19:22:24Z srt $
Author:
srt
See Also:
Serialized Form

Field Summary
static AsteriskVersion ASTERISK_1_0
          Represents the Asterisk 1.0 series.
static AsteriskVersion ASTERISK_1_2
          Represents the Asterisk 1.2 series.
static AsteriskVersion ASTERISK_1_4
          Represents the Asterisk 1.4 series.
static AsteriskVersion ASTERISK_1_6
          Represents the Asterisk 1.6 series.
 
Method Summary
 int compareTo(AsteriskVersion o)
           
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 boolean isAtLeast(AsteriskVersion o)
          Returns true if this version is equal to or higher than the given version.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ASTERISK_1_0

public static final AsteriskVersion ASTERISK_1_0
Represents the Asterisk 1.0 series.


ASTERISK_1_2

public static final AsteriskVersion ASTERISK_1_2
Represents the Asterisk 1.2 series.


ASTERISK_1_4

public static final AsteriskVersion ASTERISK_1_4
Represents the Asterisk 1.4 series.

Since:
0.3

ASTERISK_1_6

public static final AsteriskVersion ASTERISK_1_6
Represents the Asterisk 1.6 series.

Since:
1.0.0
Method Detail

isAtLeast

public boolean isAtLeast(AsteriskVersion o)
Returns true if this version is equal to or higher than the given version.

Parameters:
o - the version to compare to
Returns:
true if this version is equal to or higher than the given version, false otherwise.

compareTo

public int compareTo(AsteriskVersion o)
Specified by:
compareTo in interface java.lang.Comparable<AsteriskVersion>

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Asterisk-Java

Copyright © 2004-2009 Stefan Reuter. All Rights Reserved.