⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 coffeebrewer.java

📁 EmployeeArray的应用及EmployeeArray在输入输出的控制
💻 JAVA
字号:
package uml;

import java.util.Collection;
import java.util.Iterator;


public class CoffeeBrewer {

	/**
	 * @uml.property  name="Code"
	 */
	private String code = "";

	/**
	 * Getter of the property <tt>Code</tt>
	 * @return  Returns the code.
	 * @uml.property  name="Code"
	 */
	public String getCode() {
		return code;
	}

	/**
	 * Setter of the property <tt>Code</tt>
	 * @param Code  The code to set.
	 * @uml.property  name="Code"
	 */
	public void setCode(String code) {
		this.code = code;
	}

	/**
	 * @uml.property  name="Description"
	 */
	private String description = "";

	/**
	 * Getter of the property <tt>Description</tt>
	 * @return  Returns the description.
	 * @uml.property  name="Description"
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * Setter of the property <tt>Description</tt>
	 * @param Description  The description to set.
	 * @uml.property  name="Description"
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * @uml.property  name="Price"
	 */
	private double price;

	/**
	 * Getter of the property <tt>Price</tt>
	 * @return  Returns the price.
	 * @uml.property  name="Price"
	 */
	public double getPrice() {
		return price;
	}

	/**
	 * Setter of the property <tt>Price</tt>
	 * @param Price  The price to set.
	 * @uml.property  name="Price"
	 */
	public void setPrice(double price) {
		this.price = price;
	}

	/**
	 * @uml.property  name="Model_of_the_brewer"
	 */
	private String model_of_the_brewer = "";

	/**
	 * Getter of the property <tt>Model_of_the_brewer</tt>
	 * @return  Returns the model_of_the_brewer.
	 * @uml.property  name="Model_of_the_brewer"
	 */
	public String getModel_of_the_brewer() {
		return model_of_the_brewer;
	}

	/**
	 * Setter of the property <tt>Model_of_the_brewer</tt>
	 * @param Model_of_the_brewer  The model_of_the_brewer to set.
	 * @uml.property  name="Model_of_the_brewer"
	 */
	public void setModel_of_the_brewer(String model_of_the_brewer) {
		this.model_of_the_brewer = model_of_the_brewer;
	}

	/**
	 * @uml.property  name="Type_of_the_water_supply"
	 */
	private String type_of_the_water_supply = "";

	/**
	 * Getter of the property <tt>Type_of_the_water_supply</tt>
	 * @return  Returns the type_of_the_water_supply.
	 * @uml.property  name="Type_of_the_water_supply"
	 */
	public String getType_of_the_water_supply() {
		return type_of_the_water_supply;
	}

	/**
	 * Setter of the property <tt>Type_of_the_water_supply</tt>
	 * @param Type_of_the_water_supply  The type_of_the_water_supply to set.
	 * @uml.property  name="Type_of_the_water_supply"
	 */
	public void setType_of_the_water_supply(String type_of_the_water_supply) {
		this.type_of_the_water_supply = type_of_the_water_supply;
	}

	/**
	 * @uml.property  name="Capacity"
	 */
	private int capacity;

	/**
	 * Getter of the property <tt>Capacity</tt>
	 * @return  Returns the capacity.
	 * @uml.property  name="Capacity"
	 */
	public int getCapacity() {
		return capacity;
	}

	/**
	 * Setter of the property <tt>Capacity</tt>
	 * @param Capacity  The capacity to set.
	 * @uml.property  name="Capacity"
	 */
	public void setCapacity(int capacity) {
		this.capacity = capacity;
	}

	/**
	 * @uml.property  name="coffeeAccessory"
	 * @uml.associationEnd  multiplicity="(1 -1)" inverse="coffeeBrewer:uml.CoffeeAccessory"
	 */
	private Collection coffeeAccessory;

	/**
	 * Getter of the property <tt>coffeeAccessory</tt>
	 * @return  Returns the coffeeAccessory.
	 * @uml.property  name="coffeeAccessory"
	 */
	public Collection getCoffeeAccessory() {
		return coffeeAccessory;
	}

	/**
	 * Returns an iterator over the elements in this collection. 
	 * @return  an <tt>Iterator</tt> over the elements in this collection
	 * @see java.util.Collection#iterator()
	 * @uml.property  name="coffeeAccessory"
	 */
	public Iterator coffeeAccessoryIterator() {
		return coffeeAccessory.iterator();
	}

	/**
	 * Returns <tt>true</tt> if this collection contains no elements.
	 * @return  <tt>true</tt> if this collection contains no elements
	 * @see java.util.Collection#isEmpty()
	 * @uml.property  name="coffeeAccessory"
	 */
	public boolean isCoffeeAccessoryEmpty() {
		return coffeeAccessory.isEmpty();
	}

	/**
	 * Returns <tt>true</tt> if this collection contains the specified element. 
	 * @param element  whose presence in this collection is to be tested.
	 * @see java.util.Collection#contains(Object)
	 * @uml.property  name="coffeeAccessory"
	 */
	public boolean containsCoffeeAccessory(CoffeeAccessory coffeeAccessory) {
		return this.coffeeAccessory.contains(coffeeAccessory);
	}

	/**
	 * Returns <tt>true</tt> if this collection contains all of the elements in the specified collection.
	 * @param elements  collection to be checked for containment in this collection.
	 * @see java.util.Collection#containsAll(Collection)
	 * @uml.property  name="coffeeAccessory"
	 */
	public boolean containsAllCoffeeAccessory(Collection coffeeAccessory) {
		return this.coffeeAccessory.containsAll(coffeeAccessory);
	}

	/**
	 * Returns the number of elements in this collection.
	 * @return  the number of elements in this collection
	 * @see java.util.Collection#size()
	 * @uml.property  name="coffeeAccessory"
	 */
	public int coffeeAccessorySize() {
		return coffeeAccessory.size();
	}

	/**
	 * Returns all elements of this collection in an array.
	 * @return  an array containing all of the elements in this collection
	 * @see java.util.Collection#toArray()
	 * @uml.property  name="coffeeAccessory"
	 */
	public CoffeeAccessory[] coffeeAccessoryToArray() {
		return (CoffeeAccessory[]) coffeeAccessory
				.toArray(new CoffeeAccessory[coffeeAccessory.size()]);
	}

	/**
	 * Returns an array containing all of the elements in this collection;  the runtime type of the returned array is that of the specified array.
	 * @param a  the array into which the elements of this collection are to be stored.
	 * @return  an array containing all of the elements in this collection
	 * @see java.util.Collection#toArray(Object[])
	 * @uml.property  name="coffeeAccessory"
	 */
	public CoffeeAccessory[] coffeeAccessoryToArray(CoffeeAccessory[] coffeeAccessory) {
		return (CoffeeAccessory[]) this.coffeeAccessory.toArray(coffeeAccessory);
	}

	/**
	 * Ensures that this collection contains the specified element (optional operation). 
	 * @param element  whose presence in this collection is to be ensured.
	 * @see java.util.Collection#add(Object)
	 * @uml.property  name="coffeeAccessory"
	 */
	public boolean addCoffeeAccessory(CoffeeAccessory coffeeAccessory) {
		return this.coffeeAccessory.add(coffeeAccessory);
	}

	/**
	 * Setter of the property <tt>coffeeAccessory</tt>
	 * @param coffeeAccessory  the coffeeAccessory to set.
	 * @uml.property  name="coffeeAccessory"
	 */
	public void setCoffeeAccessory(Collection coffeeAccessory) {
		this.coffeeAccessory = coffeeAccessory;
	}

	/**
	 * Removes a single instance of the specified element from this collection, if it is present (optional operation).
	 * @param element  to be removed from this collection, if present.
	 * @see java.util.Collection#add(Object)
	 * @uml.property  name="coffeeAccessory"
	 */
	public boolean removeCoffeeAccessory(CoffeeAccessory coffeeAccessory) {
		return this.coffeeAccessory.remove(coffeeAccessory);
	}

	/**
	 * Removes all of the elements from this collection (optional operation).
	 * @see java.util.Collection#clear()
	 * @uml.property  name="coffeeAccessory"
	 */
	public void clearCoffeeAccessory() {
		this.coffeeAccessory.clear();
	}

	/**
	 * @uml.property  name="coffee"
	 * @uml.associationEnd  multiplicity="(1 -1)" inverse="coffeeBrewer:uml.Coffee"
	 */
	private Collection coffee;

	/**
	 * Getter of the property <tt>coffee</tt>
	 * @return  Returns the coffee.
	 * @uml.property  name="coffee"
	 */
	public Collection getCoffee() {
		return coffee;
	}

	/**
	 * Returns an iterator over the elements in this collection. 
	 * @return  an <tt>Iterator</tt> over the elements in this collection
	 * @see java.util.Collection#iterator()
	 * @uml.property  name="coffee"
	 */
	public Iterator coffeeIterator() {
		return coffee.iterator();
	}

	/**
	 * Returns <tt>true</tt> if this collection contains no elements.
	 * @return  <tt>true</tt> if this collection contains no elements
	 * @see java.util.Collection#isEmpty()
	 * @uml.property  name="coffee"
	 */
	public boolean isCoffeeEmpty() {
		return coffee.isEmpty();
	}

	/**
	 * Returns <tt>true</tt> if this collection contains the specified element. 
	 * @param element  whose presence in this collection is to be tested.
	 * @see java.util.Collection#contains(Object)
	 * @uml.property  name="coffee"
	 */
	public boolean containsCoffee(Coffee coffee) {
		return this.coffee.contains(coffee);
	}

	/**
	 * Returns <tt>true</tt> if this collection contains all of the elements in the specified collection.
	 * @param elements  collection to be checked for containment in this collection.
	 * @see java.util.Collection#containsAll(Collection)
	 * @uml.property  name="coffee"
	 */
	public boolean containsAllCoffee(Collection coffee) {
		return this.coffee.containsAll(coffee);
	}

	/**
	 * Returns the number of elements in this collection.
	 * @return  the number of elements in this collection
	 * @see java.util.Collection#size()
	 * @uml.property  name="coffee"
	 */
	public int coffeeSize() {
		return coffee.size();
	}

	/**
	 * Returns all elements of this collection in an array.
	 * @return  an array containing all of the elements in this collection
	 * @see java.util.Collection#toArray()
	 * @uml.property  name="coffee"
	 */
	public Coffee[] coffeeToArray() {
		return (Coffee[]) coffee.toArray(new Coffee[coffee.size()]);
	}

	/**
	 * Returns an array containing all of the elements in this collection;  the runtime type of the returned array is that of the specified array.
	 * @param a  the array into which the elements of this collection are to be stored.
	 * @return  an array containing all of the elements in this collection
	 * @see java.util.Collection#toArray(Object[])
	 * @uml.property  name="coffee"
	 */
	public Coffee[] coffeeToArray(Coffee[] coffee) {
		return (Coffee[]) this.coffee.toArray(coffee);
	}

	/**
	 * Ensures that this collection contains the specified element (optional operation). 
	 * @param element  whose presence in this collection is to be ensured.
	 * @see java.util.Collection#add(Object)
	 * @uml.property  name="coffee"
	 */
	public boolean addCoffee(Coffee coffee) {
		return this.coffee.add(coffee);
	}

	/**
	 * Setter of the property <tt>coffee</tt>
	 * @param coffee  the coffee to set.
	 * @uml.property  name="coffee"
	 */
	public void setCoffee(Collection coffee) {
		this.coffee = coffee;
	}

	/**
	 * Removes a single instance of the specified element from this collection, if it is present (optional operation).
	 * @param element  to be removed from this collection, if present.
	 * @see java.util.Collection#add(Object)
	 * @uml.property  name="coffee"
	 */
	public boolean removeCoffee(Coffee coffee) {
		return this.coffee.remove(coffee);
	}

	/**
	 * Removes all of the elements from this collection (optional operation).
	 * @see java.util.Collection#clear()
	 * @uml.property  name="coffee"
	 */
	public void clearCoffee() {
		this.coffee.clear();
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -