All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tmsps.ne4weixin.bean.menu.Menu Maven / Gradle / Ivy

There is a newer version: 3.2.2.3
Show newest version
package com.tmsps.ne4weixin.bean.menu;

import java.util.ArrayList;
import java.util.List;

import com.alibaba.fastjson.annotation.JSONField;

public class Menu {
	
	/**
	 *  一级菜单最多三个
	 */
	@JSONField(name = "button")
	private List menuButton = new ArrayList();

	public Menu(List menuButton) {
		super();
		this.menuButton = menuButton;
	}

	public List getMenuButton() {
		return menuButton;
	}

	public void setMenuButton(List menuButton) {
		if (null == menuButton || menuButton.size() > 3) {
			throw new IllegalArgumentException("一级菜单最多只有3个");
		}
		this.menuButton = menuButton;
	}

	public void addMenuButton(MenuButton mb) {
		this.menuButton.add(mb);
		if (this.menuButton.size() > 3) {
			throw new IllegalArgumentException("一级菜单最多只有3个");
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy