From 2f39bc8edeb07f6096a513bd0bd6e4c228e0b028 Mon Sep 17 00:00:00 2001 From: Marcin Chrzanowski Date: Tue, 22 Oct 2019 13:49:25 +0200 Subject: Fix comments in ZMI --- .../edu/mimuw/cloudatlas/model/AttributesMap.java | 26 ++++++++++---------- src/pl/edu/mimuw/cloudatlas/model/ZMI.java | 28 +++++++++++----------- 2 files changed, 27 insertions(+), 27 deletions(-) (limited to 'src/pl/edu/mimuw/cloudatlas/model') diff --git a/src/pl/edu/mimuw/cloudatlas/model/AttributesMap.java b/src/pl/edu/mimuw/cloudatlas/model/AttributesMap.java index da13819..4065ad6 100644 --- a/src/pl/edu/mimuw/cloudatlas/model/AttributesMap.java +++ b/src/pl/edu/mimuw/cloudatlas/model/AttributesMap.java @@ -44,12 +44,12 @@ public class AttributesMap implements Iterable>, Cloneab } /** - * Adds to this map a new attribute mapping to the specified value. The - * attribute cannot already exist in the map. To overwrite an existing attribute, use method + * Adds a new attribute-value mapping. The + * attribute cannot already exist in the map. To overwrite an existing attribute, use * {@link #addOrChange(Attribute, Value)} instead. * * @param attribute the attribute to add - * @param value the value for the attribute + * @param value the value for attribute * @throws IllegalArgumentException if the attribute already exists in this map * @throws NullPointerException if either the attribute or the value is null; * for null value, create a Value object containing null @@ -122,7 +122,7 @@ public class AttributesMap implements Iterable>, Cloneab } /** - * Adds a new attribute< mapping to the specified value or overwrites an existing one. Convenient + * Adds a new attribute mapping to the specified value or overwrites an existing one. Convenient * version of {@link #addOrChange(Attribute, Value)}. * * @param name the attribute name @@ -165,13 +165,13 @@ public class AttributesMap implements Iterable>, Cloneab } /** - * Gets the value mapped to the specified attribute. If such mapping does not exist, this method throws - * an exception. If this is not an expected behavior, use method {@link #getOrNull(Attribute)} instead. + * Gets the value mapped to the specified attribute. If such a mapping does not exist, this method throws + * an exception. If this is not an expected behavior, use {@link #getOrNull(Attribute)} instead. * * @param attribute the attribute to obtain - * @return the value mapped to the attribute - * @throws IllegalArgumentException if no value is mapped to the attribute - * @throws NullPointerException if the attribute is null + * @return the value mapped to attribute + * @throws IllegalArgumentException if no value is mapped to attribute + * @throws NullPointerException if attribute is null * @see #getOrNull(Attribute) * @see #get(String) */ @@ -200,7 +200,7 @@ public class AttributesMap implements Iterable>, Cloneab * returns null if the requested mapping does not exist. * * @param attribute the attribute to obtain - * @return the value mapped to the attribute or null if it does not exist + * @return the value mapped to attribute or null if it does not exist * @throws NullPointerException if the attribute is null * @see #get(Attribute) * @see #getOrNull(String) @@ -223,11 +223,11 @@ public class AttributesMap implements Iterable>, Cloneab } /** - * Removes the specified attribute and its value from this map. If the attribute does not - * exist, this method performs nothing. + * Removes the specified attribute and its value from this map. If attribute does not + * exist, this method doesn't do anything. * * @param attribute the attribute to remove - * @throws NullPointerException if the attribute is null + * @throws NullPointerException if attribute is null * @see #remove(String) */ public void remove(Attribute attribute) { diff --git a/src/pl/edu/mimuw/cloudatlas/model/ZMI.java b/src/pl/edu/mimuw/cloudatlas/model/ZMI.java index 3e3f3a2..a6b78da 100644 --- a/src/pl/edu/mimuw/cloudatlas/model/ZMI.java +++ b/src/pl/edu/mimuw/cloudatlas/model/ZMI.java @@ -31,7 +31,7 @@ import java.util.List; import java.util.Map.Entry; /** - * A zone management information. This object is a single node in a zone hierarchy. It stores zone attributes as well as + * A zone management information object. This object is a single node in a zone hierarchy. It stores zone attributes as well as * references to its father and sons in the tree. */ public class ZMI implements Cloneable { @@ -49,10 +49,10 @@ public class ZMI implements Cloneable { /** * Creates a new ZMI with the specified node as a father and empty sons list. This method does not perform any - * operation on the father. Especially, setting this object as a father's son must be done + * operation on father. In particular, setting this object father's son must be done * separately. * - * @param father a father of this ZMI + * @param father the father of this ZMI * @see #addSon(ZMI) */ public ZMI(ZMI father) { @@ -60,17 +60,17 @@ public class ZMI implements Cloneable { } /** - * Gets a father of this ZMI in a tree. + * Gets the father of this ZMI. * - * @return a father of this ZMI or null if this is the root zone + * @return the father of this ZMI or null if this is the root zone */ public ZMI getFather() { return father; } /** - * Sets or changes a father of this ZMI in a tree. This method does not perform any operation on the - * father. Especially, setting this object as a father's son must be done separately. + * Sets or changes the father of this ZMI in the tree. This method does not perform any operation on + * father. In particular, setting this object as father's son must be done separately. * * @param father a new father for this ZMI * @see #addSon(ZMI) @@ -80,17 +80,17 @@ public class ZMI implements Cloneable { } /** - * Gets a list of sons of this ZMI in a tree. Modifying a return value will cause an exception. + * Gets the list of sons of this ZMI. Modifying a value in the returned list will cause an exception. * - * @return + * @return the list of sons */ public List getSons() { return Collections.unmodifiableList(sons); } /** - * Adds the specified ZMI to the list of sons of this ZMI. This method does not perform any operation on a - * son. Especially, setting this object as a son's father must be done separately. + * Adds the specified ZMI to the list of sons of this ZMI. This method does not perform any operation on + * son. In particular, setting this object as son's father must be done separately. * * @param son * @see #ZMI(ZMI) @@ -101,8 +101,8 @@ public class ZMI implements Cloneable { } /** - * Removes the specified ZMI from the list of sons of this ZMI. This method does not perform any operation on a - * son. Especially, its father remains unchanged. + * Removes the specified ZMI from the list of sons of this ZMI. This method does not perform any operation on + * son. In particular, its father remains unchanged. * * @param son * @see #setFather(ZMI) @@ -135,7 +135,7 @@ public class ZMI implements Cloneable { } /** - * Creates an independent copy of a whole hierarchy. A returned ZMI has the same reference as a father (but the + * Creates an independent copy of a whole hierarchy. A returned ZMI has the same reference as father (but the * father does not have a reference to it as a son). For the root zone, the copy is completely independent, since * its father is null. * -- cgit v1.2.3