关于菜单基础属性的实体类

关于菜单基础属性的实体类

 

 

在代码中经常会用到菜单,为了使用方便,因此创建1个菜单实体类,用于定义菜单。

 

代码:

 

package com.zhouzijing.android.util;


/**
 * 定义菜单实体结构.
 * @author stephen
 *
 */
public class MenuEntity{
	
	
	/**
	 * 生成菜单.
	 * @param groupId
	 * @param itemId
	 * @param order
	 * @param title
	 * @param iconRes
	 */
	public MenuEntity(int groupId, int itemId, int order, CharSequence title,int iconRes) {
		this(groupId,itemId,order,title);
		this.iconRes = iconRes;
	}
	
	/**
	 * 生成菜单.
	 * @param groupId
	 * @param itemId
	 * @param order
	 * @param title
	 */
	public MenuEntity(int groupId, int itemId, int order, CharSequence title) {
		super();
		this.groupId = groupId;
		this.itemId = itemId;
		this.order = order;
		this.title = title;
	}
	
	/**
	 * 组.
	 */
	private int groupId;
	/**
	 * 菜单编号.
	 */
	private int itemId;
	/**
	 * 显示顺序号.
	 */
	private int order;
	/**
	 * 菜单显示名称.
	 */
	private CharSequence title;
	/**
	 * 菜单图标.
	 */
	private int iconRes;
	/**
	 * @return the groupId
	 */
	public int getGroupId() {
		return groupId;
	}
	/**
	 * @param groupId the groupId to set
	 */
	public void setGroupId(int groupId) {
		this.groupId = groupId;
	}
	/**
	 * @return the itemId
	 */
	public int getItemId() {
		return itemId;
	}
	/**
	 * @param itemId the itemId to set
	 */
	public void setItemId(int itemId) {
		this.itemId = itemId;
	}
	/**
	 * @return the order
	 */
	public int getOrder() {
		return order;
	}
	/**
	 * @param order the order to set
	 */
	public void setOrder(int order) {
		this.order = order;
	}
	/**
	 * @return the title
	 */
	public CharSequence getTitle() {
		return title;
	}
	/**
	 * @param title the title to set
	 */
	public void setTitle(CharSequence title) {
		this.title = title;
	}
	/**
	 * @return the iconRes
	 */
	public int getIconRes() {
		return iconRes;
	}
	/**
	 * @param iconRes the iconRes to set
	 */
	public void setIconRes(int iconRes) {
		this.iconRes = iconRes;
	}
	
	
	
}
 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值