com.ibm.as400.resource
Class ResourceLevel

java.lang.Object
  |
  +--com.ibm.as400.resource.ResourceLevel
All Implemented Interfaces:
java.io.Serializable

public class ResourceLevel
extends java.lang.Object
implements java.io.Serializable

The ResourceLevel class represents a range of supported levels. A level is a string which describes some level of support.

In most cases within the AS/400 Toolbox for Java, the level is the version, release, and modification level of the AS/400 to which you are connected, in the form VxRxMx.

See Also:
Serialized Form

Field Summary
static java.lang.String V4R4M0
          Constant value for the level representing a V4R4M0 AS/400.
static java.lang.String V4R5M0
          Constant value for the level representing a V4R5M0 AS/400.
static java.lang.String V5R1M0
          Constant value for the level representing a V5R1M0 AS/400.
 
Constructor Summary
ResourceLevel()
          Constructs a ResourceLevel object which indicates that all levels are supported.
ResourceLevel(java.lang.String minLevel)
          Constructs a ResourceLevel object.
ResourceLevel(java.lang.String minLevel, java.lang.String maxLevel)
          Constructs a ResourceLevel object.
 
Method Summary
 boolean checkLevel(int vrm)
          Indicates if the VRM is within the range of this level.
 boolean checkLevel(java.lang.String level)
          Indicates if the specified level is within the range of this level.
 java.lang.String getMaxLevel()
          Returns the maximum supported level.
 java.lang.String getMinLevel()
          Returns the minimum supported level.
 java.lang.String toString()
          Returns a String representation of the level.
static java.lang.String vrmToLevel(int vrm)
          Converts the VRM to a level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

V4R4M0

public static final java.lang.String V4R4M0
Constant value for the level representing a V4R4M0 AS/400.

V4R5M0

public static final java.lang.String V4R5M0
Constant value for the level representing a V4R5M0 AS/400.

V5R1M0

public static final java.lang.String V5R1M0
Constant value for the level representing a V5R1M0 AS/400.
Constructor Detail

ResourceLevel

public ResourceLevel()
Constructs a ResourceLevel object which indicates that all levels are supported.

ResourceLevel

public ResourceLevel(java.lang.String minLevel)
Constructs a ResourceLevel object.
Parameters:
minLevel - The minimum supported level, or null if all levels are supported.

ResourceLevel

public ResourceLevel(java.lang.String minLevel,
                     java.lang.String maxLevel)
Constructs a ResourceLevel object.
Parameters:
minLevel - The minimum supported level, or null if all previous levels are supported.
maxLevel - The maximum supported level, or null if all following levels are supported.
Method Detail

checkLevel

public boolean checkLevel(int vrm)
Indicates if the VRM is within the range of this level.
Parameters:
vrm - The VRM for an AS/400.
Returns:
true if the VRM is within the range of this level, false otherwise.
See Also:
AS400.getVRM()

checkLevel

public boolean checkLevel(java.lang.String level)
Indicates if the specified level is within the range of this level.
Parameters:
level - The specified level.
Returns:
true if the specified level is within the range of this level, false otherwise.

getMinLevel

public java.lang.String getMinLevel()
Returns the minimum supported level.
Returns:
The minimum supported level, or null if all previous levels are supported.

getMaxLevel

public java.lang.String getMaxLevel()
Returns the maximum supported level.
Returns:
The maximum supported level, or null if all following levels are supported.

vrmToLevel

public static java.lang.String vrmToLevel(int vrm)
Converts the VRM to a level.
Parameters:
vrm - The VRM for an AS/400.
Returns:
The level.
See Also:
AS400.getVRM()

toString

public java.lang.String toString()
Returns a String representation of the level.
Overrides:
toString in class java.lang.Object
Returns:
The String representation of the level.