Skip to content

Commit

Permalink
Clean up Javadoc. Build Javadoc with Oracle JDK 1.8 fails. Perhaps ma…
Browse files Browse the repository at this point in the history
…ven Javadoc plugin shouldn't interpret the warnings as fatal errors... but fixing the root cause is nice.
  • Loading branch information
rizard committed Jun 17, 2016
1 parent f169efe commit 29d486c
Show file tree
Hide file tree
Showing 13 changed files with 190 additions and 81 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public interface Match extends OFObject {
* </ul>
* If one of the above conditions does not hold, returns null. Value is returned masked if partially wildcarded.
*
* @param <F> MatchField type
* @param field Match field to retrieve
* @return Value of match field (may be masked), or <code>null</code> if field is one of the conditions above does not hold.
* @throws UnsupportedOperationException If field is not supported.
Expand All @@ -67,6 +68,7 @@ public interface Match extends OFObject {
* Prerequisite: field is partially masked.
* If prerequisite is not met, a <code>null</code> is returned.
*
* @param <F> MatchField type
* @param field Match field to retrieve.
* @return Masked value of match field or null if no mask is set.
* @throws UnsupportedOperationException If field is not supported.
Expand Down Expand Up @@ -128,7 +130,7 @@ public interface Match extends OFObject {
* match. This includes the match fields that are exact or masked match
* (but not fully wildcarded).
*
* @return
* @return the Iterable of MatchField
*/
public Iterable<MatchField<?>> getMatchFields();

Expand Down Expand Up @@ -169,6 +171,7 @@ interface Builder {
/**
* Sets a specific exact value for a field.
*
* @param <F> MatchField and value type
* @param field Match field to set.
* @param value Value of match field.
* @return the Builder instance used.
Expand All @@ -179,6 +182,7 @@ interface Builder {
/**
* Sets a masked value for a field.
*
* @param <F> MatchField, value, and mask type
* @param field Match field to set.
* @param value Value of field.
* @param mask Mask value.
Expand All @@ -190,6 +194,7 @@ interface Builder {
/**
* Sets a masked value for a field.
*
* @param <F> MatchField and value with mask type
* @param field Match field to set.
* @param valueWithMask Compound Masked object contains the value and the mask.
* @return the Builder instance used.
Expand All @@ -200,6 +205,7 @@ interface Builder {
/**
* Unsets any value given for the field and wildcards it so that it matches any value.
*
* @param <F> MatchField type
* @param field Match field to unset.
* @return the Builder instance used.
* @throws UnsupportedOperationException If field is not supported.
Expand All @@ -213,4 +219,4 @@ interface Builder {
*/
public Match build();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ interface Builder {
/**
* Sets a specific value for a stat field.
*
* @param <F> StatField type
* @param field Stat field to set.
* @param value Value of stat field.
* @return the Builder instance used.
Expand All @@ -24,4 +25,4 @@ interface Builder {
public boolean supports(StatField<?> field);
public Stat build();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* @author Andreas Wundsam {@literal <}andreas.wundsam@bigswitch.com{@literal >}
*
* @param <H> - this type, for return type safety.
* @param H - this type, for return type safety.
*/
@Immutable
public interface HashValue<H extends HashValue<H>> {
Expand All @@ -20,7 +20,7 @@ public interface HashValue<H extends HashValue<H>> {
/** perform an arithmetic addition of this value and other. Wraps around on
* overflow of the defined word size.
*
* @param other
* @param other the other value to add to this
* @return this + other
*/
H add(H other);
Expand All @@ -29,74 +29,109 @@ public interface HashValue<H extends HashValue<H>> {
* arithmetically substract the given 'other' value from this value.
* around on overflow.
*
* @param other
* @param other the other value to subtract from this
* @return this - other
*/
H subtract(H other);

/** @return the bitwise inverse of this value */
H inverse();

/** or this value with another value value of the same type */
/**
* or this value with another value value of the same type
*
* @param other the other value to bitwise or with this
* @return this | other
*/
H or(H other);

/** and this value with another value value of the same type */
/**
* and this value with another value value of the same type
*
* @param other the other value to bitwise and with this
* @return this {@literal &} other
*/
H and(H other);

/** xor this value with another value value of the same type */
/**
* xor this value with another value value of the same type
*
* @param other the other value to bitwise xor with this
* @return this XOR other
*/
H xor(H other);

/** create and return a builder */
/**
* create and return a builder
*
* @return builder
*/
Builder<H> builder();

/** a mutator for HashValues. Allows perfomring a series of
* operations on a hashv value without the associated cost of object
* reallocation.
/**
* a mutator for HashValues. Allows perfomring a series of
* operations on a hashv value without the associated cost of object
* reallocation.
*
* @author Andreas Wundsam {@literal <}andreas.wundsam@bigswitch.com{@literal >}
*
* @param <H> - the hashvalue
*/
public interface Builder<H> {
/** perform an arithmetic addition of this value and other. Wraps around on
/**
* perform an arithmetic addition of this value and other. Wraps around on
* overflow of the defined word size.
*
* @param other
* @return this mutator
* @param other the other value to add to this
* @return this mutator containing this + other
*/
Builder<H> add(H other);

/**
* arithmetically substract the given 'other' value from the value stored in this mutator.
* around on overflow.
*
* @param other
* @return this mutator
* @param other the other value to subtract from this
* @return this mutator containing this - other
*/
Builder<H> subtract(H other);

/** bitwise invert the value stored in this mutator
/**
* bitwise invert the value stored in this mutator
*
* @return this mutator
* @return this mutator containing ~this
*/
Builder<H> invert();

/** or the value stored in this mutator with another value value of the same type
* @return this mutator
*/
/**
* or the value stored in this mutator with another value value of the same type
*
* @param other the other value to bitwise or with this
* @return this mutator containing this | other
*/
Builder<H> or(H other);

/** and the value stored in this mutator with another value value of the same type
* @return this mutator
*/
/**
* and the value stored in this mutator with another value value of the same type
*
* @param other the other value to bitwise and with this
* @return this mutator containing this {@literal &} other
*/
Builder<H> and(H other);

/** xor the value stored in this mutator with another value value of the same type
* @return this mutator
*/
/**
* xor the value stored in this mutator with another value value of the same type
*
* @param other the other value to bitwise exclusive or with this
* @return this mutator containing this XOR other
*/
Builder<H> xor(H other);

/** @return the hash value */
/**
* construct an immutable value from the value defined in the builder
*
* @return the hash value
*/
public H build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public abstract class IPAddress<F extends IPAddress<F>> implements OFValueType<F
* <li>the {@link IPv4Address} of {@code 0.0.0.0}
* <li>the {@link IPv6Address} of {@code ::}
* </ul>
* @return {@code true} if the IPAddress is unspecified, false otherwise
*/
public abstract boolean isUnspecified();

Expand All @@ -53,6 +54,7 @@ public abstract class IPAddress<F extends IPAddress<F>> implements OFValueType<F
* <li>any {@link IPv4Address} within {@code 127.0.0.0/8}
* <li>the {@link IPv6Address} of {@code ::1}
* </ul>
* @return {@code true} if the IPAddress is a loopback address, false otherwise
*/
public abstract boolean isLoopback();

Expand All @@ -64,6 +66,7 @@ public abstract class IPAddress<F extends IPAddress<F>> implements OFValueType<F
* <li>any {@link IPv4Address} within {@code 169.254.0.0/16}
* <li>any {@link IPv6Address} within {@code fe80::/10}
* </ul>
* @return {@code true} if the IPAddress is a link local address, false otherwise
*/
public abstract boolean isLinkLocal();

Expand Down Expand Up @@ -153,6 +156,7 @@ public abstract IPAddressWithMask<F> withMaskOfLength(
* <li>will not carry a non-zero scope ID or scoped interface,
* in the case of {@link Inet6Address}
* </ul>
* @return an {@link InetAddress} object representing this IP address
*/
@Nonnull
public abstract InetAddress toInetAddress();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,12 @@ public static IPv4Address of(@Nonnull final byte[] address) {
*
* @throws IllegalArgumentException if any of the octets were
* negative or greater than 255
* @param octet1 the highest order byte in network byte order
* @param octet2 the 2nd-highest order byte in network byte order
* @param octet3 the 2nd-lowest order byte in network byte order
* @param octet4 the lowest order byte in network byte order
* @return an {@code IPv4Address} object that represents the given
* IP address
*/
@Nonnull
public static IPv4Address of(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ private static long toModifiedEui64(@Nonnull MacAddress macAddress) {
*
* <p>This method assumes the second (lower-order) 64-bit block to be
* a 64-bit interface identifier, which may not always be true.
* @param macAddress the MAC address to check
* @return boolean true or false
*/
public boolean isModifiedEui64Derived(@Nonnull MacAddress macAddress) {
return raw2 == toModifiedEui64(macAddress);
Expand Down Expand Up @@ -412,6 +414,10 @@ public static IPv6Address of(@Nonnull final Inet6Address address) {
*
* @throws IllegalArgumentException if the specified network does not
* meet the aforementioned requirements
* @param network the IPv6 network
* @param macAddress the MAC address
* @return an {@code IPv6Address} object that represents the given
* MAC address in the specified network
*/
@Nonnull
public static IPv6Address of(
Expand Down Expand Up @@ -555,7 +561,11 @@ else if (i >= 4 && i < 8)
throw new IllegalArgumentException("16 bit word index must be in [0,7]");
}

/** get the index of the first word where to apply IPv6 zero compression */
/**
* get the index of the first word where to apply IPv6 zero compression
*
* @return the index
*/
public int getZeroCompressStart() {
int start = Integer.MAX_VALUE;
int maxLength = -1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ public static OFGroup of(final int groupNumber) {
}
}

/** return the group number as a int32 */
/**
* get the group number of this group as a int32
*
* @return the integer form of the this group
*/
public int getGroupNumber() {
return groupNumber;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ private OFPort(final int portNumber) {
* NOTE: The port object may either be newly allocated or cached. Do not
* rely on either behavior.
*
* @param portNumber
* @param portNumber the integer port number
* @return a corresponding OFPort
*/
public static OFPort ofInt(final int portNumber) {
Expand Down Expand Up @@ -294,7 +294,12 @@ public static OFPort ofInt(final int portNumber) {
}
}

/** convenience function: delegates to ofInt */
/**
* convenience function: delegates to ofInt
*
* @param portNumber the integer port number
* @return a corresponding OFPort
*/
public static OFPort of(final int portNumber) {
return ofInt(portNumber);
}
Expand All @@ -305,7 +310,7 @@ public static OFPort of(final int portNumber) {
* 32-bit integer value allocated as its port number. NOTE: The port object
* may either be newly allocated or cached. Do not rely on either behavior.
*
* @param portNumber
* @param portNumber the short port number
* @return a corresponding OFPort
*/
public static OFPort ofShort(final short portNumber) {
Expand Down Expand Up @@ -438,7 +443,11 @@ public static OFPort ofShort(final short portNumber) {
}
}

/** return the port number as a int32 */
/**
* return the port number as a int32
*
* @return the port number as an integer
*/
public int getPortNumber() {
return portNumber;
}
Expand All @@ -450,7 +459,8 @@ public int getPortNumber() {
*
* @throws IllegalArgumentException
* if a regular port number exceeds the maximum value in OF1.0
**/
* @return the port number as a short
*/
public short getShortPortNumber() {

switch (portNumber) {
Expand Down
Loading

0 comments on commit 29d486c

Please sign in to comment.