3
import java.util.Collection;
4
import java.util.Iterator;
10
* @uml.property name="ship"
11
* @uml.stereotype uml_id="JavaProfile::JavaType" value="java.util.Collection"
12
* @uml.associationEnd inverse="slot:modele.Ship"
17
* Getter of the property <tt>ship</tt>
18
* @return Returns the ship.
19
* @uml.property name="ship"
20
* @uml.stereotype uml_id="JavaProfile::JavaType" value="java.util.Collection"
21
* @uml.associationEnd inverse="slot:modele.Ship"
23
public Ship getShip() {
28
* Setter of the property <tt>ship</tt>
29
* @param ship the ship to set.
30
* @uml.property name="ship"
31
* @uml.stereotype uml_id="JavaProfile::JavaType" value="java.util.Collection"
32
* @uml.associationEnd inverse="slot:modele.Ship"
34
public void setShip(Ship ship) {
39
* @uml.property name="position"
41
private CartesianPosition position;
44
* Getter of the property <tt>position</tt>
45
* @return Returns the position.
46
* @uml.property name="position"
48
public CartesianPosition getPosition() {
53
* Setter of the property <tt>position</tt>
54
* @param position The position to set.
55
* @uml.property name="position"
57
public void setPosition(CartesianPosition position) {
58
this.position = position;
64
// * Returns the number of elements in this collection.
65
// * @return the number of elements in this collection
66
// * @see java.util.Collection#size()
67
// * @uml.property name="ship"
69
// public int shipSize() {
70
// return ship.size();
73
// * Setter of the property <tt>ship</tt>
74
// * @param ship the ship to set.
75
// * @uml.property name="ship"
77
// public void setShip(Collection ship) {
81
// * Ensures that this collection contains the specified element (optional operation).
82
// * @param element whose presence in this collection is to be ensured.
83
// * @see java.util.Collection#add(Object)
84
// * @uml.property name="ship"
86
// public boolean addShip(Ship Ship) {
87
// return ship.add(Ship);
90
// * Returns <tt>true</tt> if this collection contains all of the elements in the specified collection.
91
// * @param elements collection to be checked for containment in this collection.
92
// * @see java.util.Collection#containsAll(Collection)
93
// * @uml.property name="ship"
95
// public boolean containsAllShip(Collection ship) {
96
// return this.ship.containsAll(ship);
99
// * Removes all of the elements from this collection (optional operation).
100
// * @see java.util.Collection#clear()
101
// * @uml.property name="ship"
103
// public void clearShip() {
107
// * Returns all elements of this collection in an array.
108
// * @return an array containing all of the elements in this collection
109
// * @see java.util.Collection#toArray()
110
// * @uml.property name="ship"
112
// public Ship[] shipToArray() {
113
// return (Ship[]) ship.toArray(new Ship[ship.size()]);
116
// * Removes a single instance of the specified element from this collection, if it is present (optional operation).
117
// * @param element to be removed from this collection, if present.
118
// * @see java.util.Collection#add(Object)
119
// * @uml.property name="ship"
121
// public boolean removeShip(Ship Ship) {
122
// return ship.remove(Ship);
125
// * Getter of the property <tt>ship</tt>
126
// * @return Returns the ship.
127
// * @uml.property name="ship"
129
// public Collection getShip() {
133
// * Returns <tt>true</tt> if this collection contains the specified element.
134
// * @param element whose presence in this collection is to be tested.
135
// * @see java.util.Collection#contains(Object)
136
// * @uml.property name="ship"
138
// public boolean containsShip(Ship Ship) {
139
// return ship.contains(Ship);
142
// * Returns <tt>true</tt> if this collection contains no elements.
143
// * @return <tt>true</tt> if this collection contains no elements
144
// * @see java.util.Collection#isEmpty()
145
// * @uml.property name="ship"
147
// public boolean isShipEmpty() {
148
// return ship.isEmpty();
151
// * Returns an iterator over the elements in this collection.
152
// * @return an <tt>Iterator</tt> over the elements in this collection
153
// * @see java.util.Collection#iterator()
154
// * @uml.property name="ship"
156
// public Iterator shipIterator() {
157
// return ship.iterator();
b'\\ No newline at end of file'