---
title: "为枚举赋值"
author: "g21121"
date: "2011-08-02T16:36:43Z"
tags: []
categories: ["企业架构"]
slug: "untitled"
draft: false
lastmod: "2011-08-02T16:36:43Z"
id: 1138350
url: "https://286.iteye.com/blog/1138350"
---

```
public enum UserStatus {
	
	MIN_LEVEL(1);
	
	private final int value;

	private UserStatus(int value){
		this.value=value;
	}

	public int getValue() {
		return value;
	}
	
}
```