com.partnersoft.formats.dxf
Enum DxfVersion

java.lang.Object
  extended by java.lang.Enum<DxfVersion>
      extended by com.partnersoft.formats.dxf.DxfVersion
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<DxfVersion>

public enum DxfVersion
extends java.lang.Enum<DxfVersion>
implements java.lang.Comparable<DxfVersion>

DXF and drawing database versions, based on specifications released by AutoDesk.

In general, these reflect DXF files generated from AutoCAD. They are used (in a very limited fashion) during reading of DXF files. They are used more extensively during writing, since the available features, and to some extent, file structure is heavily dependent on which version of the spec is being used.

You can use #compareTo(DxfVersion) to compare versions based on the release timeline. For example, AUTOCAD_2000 is greater than AUTOCAD_R12. This allows you to make decisions about features only used or available starting with a specific version.

Copyright 2006 Partner Software, Inc.

Version:
$Id: DxfVersion.java 1012 2007-11-24 18:30:02Z paul $
Author:
Paul Reavis

Enum Constant Summary
AUTOCAD_2000
          DXF and drawing database version used by AutoCAD 2000.
AUTOCAD_2007
          DXF and drawing database version used by AutoCAD 2007.
AUTOCAD_R10
          DXF and drawing database version used by AutoCAD Release 10.
AUTOCAD_R12
          DXF and drawing database version used by AutoCAD Release 11 and 12.
AUTOCAD_R13
          DXF and drawing database version used by AutoCAD Release 13.
AUTOCAD_R14
          DXF and drawing database version used by AutoCAD Release 14.
 
Method Summary
 java.lang.String getName()
          A human-oriented name for the version.
 java.lang.String getNumber()
          The version number as specified in the $ACADVER variable in the DXF file.
 boolean isAtLeast(DxfVersion nother)
          Returns true if this version is the same as, or later than, the given version.
 java.lang.String toString()
           
static DxfVersion valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static DxfVersion[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 DxfVersion versionForName(java.lang.String name)
          Returns the correct DxfVersion based on the given version name.
 DxfVersion versionForNumber(java.lang.String number)
          Returns the correct DxfVersion based on the given version number.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Enum Constant Detail

AUTOCAD_R10

public static final DxfVersion AUTOCAD_R10
DXF and drawing database version used by AutoCAD Release 10.


AUTOCAD_R12

public static final DxfVersion AUTOCAD_R12
DXF and drawing database version used by AutoCAD Release 11 and 12.


AUTOCAD_R13

public static final DxfVersion AUTOCAD_R13
DXF and drawing database version used by AutoCAD Release 13.


AUTOCAD_R14

public static final DxfVersion AUTOCAD_R14
DXF and drawing database version used by AutoCAD Release 14.


AUTOCAD_2000

public static final DxfVersion AUTOCAD_2000
DXF and drawing database version used by AutoCAD 2000.


AUTOCAD_2007

public static final DxfVersion AUTOCAD_2007
DXF and drawing database version used by AutoCAD 2007.

Method Detail

values

public static DxfVersion[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (DxfVersion c : DxfVersion.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static DxfVersion valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

versionForNumber

public DxfVersion versionForNumber(java.lang.String number)
Returns the correct DxfVersion based on the given version number.


versionForName

public DxfVersion versionForName(java.lang.String name)
Returns the correct DxfVersion based on the given version name.


isAtLeast

public boolean isAtLeast(DxfVersion nother)
Returns true if this version is the same as, or later than, the given version.


getName

public java.lang.String getName()
A human-oriented name for the version.

Returns:
name for the version

getNumber

public java.lang.String getNumber()
The version number as specified in the $ACADVER variable in the DXF file.

Returns:
version number used in $ACADVER

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<DxfVersion>