com.supermap.data
类 Enum
- java.lang.Object
-
- com.supermap.data.Enum
-
- 直接已知子类:
- Action, Action3D, AggregationFunctionType, AlongLineDirection, AltitudeMode, AnimationDefine.AnimationGroupPlayState, AnimationDefine.AnimationType, AnimationDefine.BlinkAnimationBlinkStyle, AnimationDefine.BlinkAnimationReplaceStyle, AnimationDefine.PathType, AnimationDefine.RotateDirection, ARAnimationRepeatMode, ARMode, BoundsType, BoxClipPart, BufferEndType, BufferRadiusUnit, CalibrateMode, CellSizeType, ColorGradientType, ColorType, CoordSysTransMethod, DatasourceEncrytionType, Direction, DisplayMode, DomeType, EncodeType, FileType, FlyingMode, FlyStatus, GeometryType, GeoSpheroidType, GraduatedMode, GraphAxesTextDisplayMode, GraphicObjectType, HypsometricSettingDisplayMode, ImageDisplayMode, ImageFormatType, ImageStretchType, JoinType, LabelBackShape, Layer3DType, Layer3DVectorFileDataType, LayerGridAggregationType, LayerSettingType, LicenseType, LightTypes, MapColorMode, MapGridShape, MapGridType, MarkPos, Module, MultiBandImportMode, MultiViewportMode, NetworkSplitMode, NodeAnimationPlayMode, OverLengthLabelMode, PixelFormat, PixelToGlobeMode, QueryMode, QueryOption, RangeMode, RasterClipFileType, RegularizeMethod, ResampleType, SceneType, SelectionMode, SideType, SlopeType, SmoothMethod, SnapMode, SpatialIndexType, SpatialQueryMode, Speaker, StrokeType, SupplyCenterType, SurroundLineType, SymbolType, TextAlignment, ThemeGraphTextFormat, ThemeGraphType, TransformationMode, ViewShedType, ViewType, WebParamsType, WhereToCalibrate, WorkspaceVersion
public abstract class Enum extends java.lang.Object所有枚举类(如地图操作状态枚举,数据集类型枚举等)的基类。提供各枚举类型共有的方法。
-
-
方法概要
所有方法 静态方法 实例方法 具体方法 限定符和类型 方法和说明 booleanequals(java.lang.Object other)当指定对象等于此枚举常量时,返回 true。static Enum[]getEnums(java.lang.Class type)返回指定枚举类的所有枚举常量。static java.lang.StringgetNameByValue(java.lang.Class type, int value)根据枚举值返回对应的枚举常量的名称。static java.lang.String[]getNames(java.lang.Class type)返回指定枚举类的所有枚举常量的名称的集合。static intgetValueByName(java.lang.Class type, java.lang.String name)根据枚举常量的名称返回对应的枚举值。static int[]getValues(java.lang.Class type)返回指定枚举类的枚举值的集合。inthashCode()返回枚举常量的哈希码。static booleanisDefined(java.lang.Class type, int value)枚举类型中是否定义了指定的枚举值对应的枚举常量。static booleanisDefined(java.lang.Class type, java.lang.String name)枚举类型中是否定义了指定的枚举名的枚举常量。java.lang.Stringname()返回枚举常量的名称。static Enumparse(java.lang.Class type, int value)根据枚举值返回对应的枚举常量。static Enumparse(java.lang.Class type, java.lang.String name)根据枚举常量的名称返回对应的枚举常量。java.lang.StringtoString()返回枚举常量的名称。intvalue()返回枚举值。
-
-
-
方法详细资料
-
name
public final java.lang.String name()
返回枚举常量的名称。- 返回:
- 枚举常量的名称。
-
value
public final int value()
返回枚举值。- 返回:
- 枚举值。
-
toString
public java.lang.String toString()
返回枚举常量的名称。- 覆盖:
toString在类中java.lang.Object- 返回:
- 枚举常量的名称。
-
equals
public final boolean equals(java.lang.Object other)
当指定对象等于此枚举常量时,返回 true。由于枚举值表现为静态的字段,因此直接比较引用便可知两枚举是否相等。
- 覆盖:
equals在类中java.lang.Object- 参数:
other- 要与此对象进行相等性比较的对象。- 返回:
- 一个布尔值,如果指定对象等于此枚举常量,则返回 true。
-
hashCode
public final int hashCode()
返回枚举常量的哈希码。- 覆盖:
hashCode在类中java.lang.Object- 返回:
- 枚举常量的哈希码。
-
getNames
public static final java.lang.String[] getNames(java.lang.Class type)
返回指定枚举类的所有枚举常量的名称的集合。- 参数:
type- 指定的枚举类。- 返回:
- 指定枚举类中枚举常量的名称的集合。
-
getValues
public static int[] getValues(java.lang.Class type)
返回指定枚举类的枚举值的集合。- 参数:
type- 指定的枚举类。- 返回:
- 指定枚举类的枚举值的集合。
-
getEnums
public static Enum[] getEnums(java.lang.Class type)
返回指定枚举类的所有枚举常量。- 参数:
type- 指定的枚举类。- 返回:
- 指定枚举类的所有枚举常量。
-
getNameByValue
public static java.lang.String getNameByValue(java.lang.Class type, int value)根据枚举值返回对应的枚举常量的名称。- 参数:
type- 指定的枚举类。value- 指定的枚举值。- 返回:
- 枚举常量的名称。
-
getValueByName
public static int getValueByName(java.lang.Class type, java.lang.String name)根据枚举常量的名称返回对应的枚举值。- 参数:
type- 指定的枚举类。name- 指定的枚举常量的名称。- 返回:
- 枚举值。
-
parse
public static Enum parse(java.lang.Class type, int value)
根据枚举值返回对应的枚举常量。- 参数:
type- 指定的枚举类。value- 指定的枚举值。- 返回:
- 对应的枚举常量。
-
parse
public static Enum parse(java.lang.Class type, java.lang.String name)
根据枚举常量的名称返回对应的枚举常量。- 参数:
type- 指定的枚举类。name- 指定的枚举常量的名称。- 返回:
- 枚举常量。
-
isDefined
public static boolean isDefined(java.lang.Class type, int value)枚举类型中是否定义了指定的枚举值对应的枚举常量。- 参数:
type- 指定的枚举类。value- 指定的枚举值。- 返回:
- 一个布尔值,true 表示已定义,false 表示未定义。
-
isDefined
public static boolean isDefined(java.lang.Class type, java.lang.String name)枚举类型中是否定义了指定的枚举名的枚举常量。- 参数:
type- Class 指定的枚举类。name- String 指定的枚举名。- 返回:
- 一个布尔值,true 表示已定义,false 表示未定义。
-
-