javadoc fixes part 1 (ticket #1894)

This commit is contained in:
zzz
2017-01-26 20:37:44 +00:00
parent d9c6360e0a
commit f77fc52ca7
19 changed files with 50 additions and 50 deletions

View File

@ -47,7 +47,7 @@ public interface I2PClient {
public static final SigType DEFAULT_SIGTYPE = SigType.DSA_SHA1;
/**
* For router->client payloads.
* For router->client payloads.
*
* If false, the router will send the MessageStatus,
* the client must respond with a ReceiveMessageBegin,

View File

@ -73,7 +73,7 @@ public interface I2PSession {
* End-to-End Crypto is disabled, tags and keys are ignored!
*
* Like sendMessage above, except the key used and the tags sent are exposed to the
* application. <p />
* application. <p>
*
* If some application layer message delivery confirmation is used,
* rather than i2p's (slow) built in confirmation via guaranteed delivery mode, the
@ -331,7 +331,7 @@ public interface I2PSession {
* Suggested implementation:
*
*<pre>
* if (name.length() == 60 && name.toLowerCase(Locale.US).endsWith(".b32.i2p")) {
* if (name.length() == 60 &amp;&amp; name.toLowerCase(Locale.US).endsWith(".b32.i2p")) {
* if (session != null)
* return session.lookup(Hash.create(Base32.decode(name.toLowerCase(Locale.US).substring(0, 52))));
* else

View File

@ -27,7 +27,7 @@ import net.i2p.data.i2cp.SetDateMessage;
* @author jrandom
*/
class I2PClientMessageHandlerMap {
/** map of message type id --> I2CPMessageHandler */
/** map of message type id --&gt; I2CPMessageHandler */
protected I2CPMessageHandler _handlers[];
/** for extension */

View File

@ -124,7 +124,7 @@ public abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2
/** class that generates new messages */
protected final I2CPMessageProducer _producer;
/** map of Long --> MessagePayloadMessage */
/** map of Long --&gt; MessagePayloadMessage */
protected Map<Long, MessagePayloadMessage> _availableMessages;
/** hashes of lookups we are waiting for */

View File

@ -34,17 +34,17 @@ import net.i2p.util.Log;
* Therefore the compatibility situation is as follows:
*
* Compatibility:
* old streaming -> new streaming: sends proto anything, rcvs proto anything
* new streaming -> old streaming: sends PROTO_STREAMING, ignores rcvd proto
* old datagram -> new datagram: sends proto anything, rcvs proto anything
* new datagram -> old datagram: sends PROTO_DATAGRAM, ignores rcvd proto
* old streaming -&gt; new streaming: sends proto anything, rcvs proto anything
* new streaming -&gt; old streaming: sends PROTO_STREAMING, ignores rcvd proto
* old datagram -&gt; new datagram: sends proto anything, rcvs proto anything
* new datagram -&gt; old datagram: sends PROTO_DATAGRAM, ignores rcvd proto
* In all the above cases, streaming and datagram receive traffic for the other
* protocol, same as before.
*
* old datagram -> new muxed: doesn't work because the old sends proto 0 but the udp side
* old datagram -&gt; new muxed: doesn't work because the old sends proto 0 but the udp side
* of the mux registers with PROTO_DATAGRAM, so the datagrams
* go to the streaming side, same as before.
* old streaming -> new muxed: works
* old streaming -&gt; new muxed: works
*
* Typical Usage:
* Streaming + datagrams:
@ -421,7 +421,7 @@ class I2PSessionMuxedImpl extends I2PSessionImpl2 {
/**
* No, we couldn't put any protocol byte in front of everything and
* keep backward compatibility. But there are several bytes that
* are unused AND unchecked in the gzip header in releases <= 0.7.
* are unused AND unchecked in the gzip header in releases &lt;= 0.7.
* So let's use 5 of them for a protocol and two 2-byte ports.
*
* Following are all the methods to hide the

View File

@ -28,8 +28,8 @@ import net.i2p.util.SystemVersion;
*
* <p>The FIPS PUB 180-2 standard specifies four secure hash algorithms (SHA-1,
* SHA-256, SHA-384 and SHA-512) for computing a condensed representation of
* electronic data (message). When a message of any length < 2^^64 bits (for
* SHA-1 and SHA-256) or < 2^^128 bits (for SHA-384 and SHA-512) is input to
* electronic data (message). When a message of any length &lt; 2^^64 bits (for
* SHA-1 and SHA-256) or &lt; 2^^128 bits (for SHA-384 and SHA-512) is input to
* an algorithm, the result is an output called a message digest. The message
* digests range in length from 160 to 512 bits, depending on the algorithm.
* Secure hash algorithms are typically used with other cryptographic

View File

@ -18,22 +18,22 @@ public class Ed25519LittleEndianEncoding extends Encoding {
* Assumption:
* <p><ul>
* <li>p = 2^255 - 19
* <li>h = h0 + 2^25 * h1 + 2^(26+25) * h2 + ... + 2^230 * h9 where 0 <= |hi| < 2^27 for all i=0,...,9.
* <li>h congruent r modulo p, i.e. h = r + q * p for some suitable 0 <= r < p and an integer q.
* <li>h = h0 + 2^25 * h1 + 2^(26+25) * h2 + ... + 2^230 * h9 where 0 &lt;= |hi| &lt; 2^27 for all i=0,...,9.
* <li>h congruent r modulo p, i.e. h = r + q * p for some suitable 0 &lt;= r &lt; p and an integer q.
* </ul><p>
* Then q = [2^-255 * (h + 19 * 2^-25 * h9 + 1/2)] where [x] = floor(x).
* <p>
* Proof:
* <p>
* We begin with some very raw estimation for the bounds of some expressions:
* <pre>|h| < 2^230 * 2^30 = 2^260 ==> |r + q * p| < 2^260 ==> |q| < 2^10.
* ==> -1/4 <= a := 19^2 * 2^-255 * q < 1/4.
* |h - 2^230 * h9| = |h0 + ... + 2^204 * h8| < 2^204 * 2^30 = 2^234.
* ==> -1/4 <= b := 19 * 2^-255 * (h - 2^230 * h9) < 1/4</pre>
* Therefore 0 < 1/2 - a - b < 1.
* <pre>|h| &lt; 2^230 * 2^30 = 2^260 ==&gt; |r + q * p| &lt; 2^260 ==&gt; |q| &lt; 2^10.
* ==&gt; -1/4 &lt;= a := 19^2 * 2^-255 * q &lt; 1/4.
* |h - 2^230 * h9| = |h0 + ... + 2^204 * h8| &lt; 2^204 * 2^30 = 2^234.
* ==&gt; -1/4 &lt;= b := 19 * 2^-255 * (h - 2^230 * h9) &lt; 1/4</pre>
* Therefore 0 &lt; 1/2 - a - b &lt; 1.
* <p>
* Set x := r + 19 * 2^-255 * r + 1/2 - a - b then
* 0 <= x < 255 - 20 + 19 + 1 = 2^255 ==> 0 <= 2^-255 * x < 1. Since q is an integer we have
* 0 &lt;= x &lt; 255 - 20 + 19 + 1 = 2^255 ==&gt; 0 &lt;= 2^-255 * x &lt; 1. Since q is an integer we have
*
* <pre>[q + 2^-255 * x] = q (1)</pre>
* <p>

View File

@ -150,7 +150,7 @@ public class SigningPublicKey extends SimpleDataStructure {
* Get the portion of this (type 0) SPK that is really padding based on the Key Cert type given,
* if any
*
* @return leading padding length > 0 or null if no padding or type is unknown
* @return leading padding length &gt; 0 or null if no padding or type is unknown
* @throws IllegalArgumentException if this is already typed to a different type
* @since 0.9.12
*/

View File

@ -44,7 +44,7 @@ public class RequestVariableLeaseSetMessage extends I2CPMessageImpl {
* Does the client support this message?
*
* @param clientVersion may be null
* @return version != null and version >= 0.9.7
* @return version != null and version &gt;= 0.9.7
*/
public static boolean isSupported(String clientVersion) {
return clientVersion != null &&

View File

@ -72,9 +72,9 @@ public class KBucketSet<T extends SimpleDataStructure> {
* Use the default trim strategy, which removes a random entry.
* @param us the local identity (typically a SHA1Hash or Hash)
* The class must have a zero-argument constructor.
* @param max the Kademlia value "k", the max per bucket, k >= 4
* @param max the Kademlia value "k", the max per bucket, k &gt;= 4
* @param b the Kademlia value "b", split buckets an extra 2**(b-1) times,
* b > 0, use 1 for bittorrent, Kademlia paper recommends 5
* b &gt; 0, use 1 for bittorrent, Kademlia paper recommends 5
*/
public KBucketSet(I2PAppContext context, T us, int max, int b) {
this(context, us, max, b, new RandomTrimmer<T>(context, max));
@ -168,7 +168,7 @@ public class KBucketSet<T extends SimpleDataStructure> {
/**
* No lock required.
* FIXME will split the closest buckets too far if B > 1 and K < 2**B
* FIXME will split the closest buckets too far if B &gt; 1 and K &lt; 2**B
* Won't ever really happen and if it does it still works.
*/
private boolean shouldSplit(KBucket<T> b) {
@ -625,7 +625,7 @@ public class KBucketSet<T extends SimpleDataStructure> {
/**
* Make a new SimpleDataStrucure from the data
* @param data size <= SDS length, else throws IAE
* @param data size &lt;= SDS length, else throws IAE
* Can be 1 bigger if top byte is zero
*/
@SuppressWarnings("unchecked")

View File

@ -38,10 +38,10 @@ public class RateAverages {
/**
* @since 0.9.4
* @return one of several things:
* if there are any events (current or last) => weighted average
* if there are any events (current or last) =&gt; weighted average
* otherwise if the useLifetime parameter to Rate.computeAverages was:
* true => the lifetime average value
* false => zero
* true =&gt; the lifetime average value
* false =&gt; zero
*/
public double getAverage() {
return average;

View File

@ -13,7 +13,7 @@ import java.util.Set;
/**
* Event dispatching interface. It allows objects to receive and
* notify data events (basically String->Object associations) and
* notify data events (basically String-&gt;Object associations) and
* create notification chains. To ease the usage of this interface,
* you could define an EventDispatcherImpl attribute called
* <code>_event</code> (as suggested in EventDispatcherImpl documentation)

View File

@ -31,7 +31,7 @@ public class InternalServerSocket extends ServerSocket {
//private static Log _log = I2PAppContext.getGlobalContext().logManager().getLog(InternalServerSocket.class);
/**
* @param port > 0
* @param port &gt; 0
*/
public InternalServerSocket(int port) throws IOException {
if (port <= 0)
@ -87,7 +87,7 @@ public class InternalServerSocket extends ServerSocket {
/**
* This is how the client connects.
*
* @param port > 0
* @param port &gt; 0
*/
static void internalConnect(int port, InternalSocket clientSock) throws IOException {
InternalServerSocket iss = _sockets.get(Integer.valueOf(port));

View File

@ -26,7 +26,7 @@ public class InternalSocket extends Socket {
/**
* client side
* @param port > 0
* @param port &gt; 0
*/
public InternalSocket(int port) throws IOException {
if (port <= 0)
@ -36,7 +36,7 @@ public class InternalSocket extends Socket {
/**
* Convenience method to return either a Socket or an InternalSocket
* @param port > 0
* @param port &gt; 0
*/
public static Socket getSocket(String host, int port) throws IOException {
if (System.getProperty("router.version") != null &&

View File

@ -44,7 +44,7 @@ public class ObjectCounter<K> implements Serializable {
}
/**
* @return set of objects with counts > 0
* @return set of objects with counts &gt; 0
*/
public Set<K> objects() {
return this.map.keySet();

View File

@ -50,7 +50,7 @@ public class PortMapper {
/**
* Add the service
* @param port > 0
* @param port &gt; 0
* @return success, false if already registered
*/
public boolean register(String service, int port) {
@ -59,7 +59,7 @@ public class PortMapper {
/**
* Add the service
* @param port > 0
* @param port &gt; 0
* @return success, false if already registered
* @since 0.9.21
*/

View File

@ -208,8 +208,8 @@ public class SimpleTimer2 {
* state of a given TimedEvent
*
* valid transitions:
* {IDLE,CANCELLED,RUNNING} -> SCHEDULED [ -> SCHEDULED ]* -> RUNNING -> {IDLE,CANCELLED,SCHEDULED}
* {IDLE,CANCELLED,RUNNING} -> SCHEDULED [ -> SCHEDULED ]* -> CANCELLED
* {IDLE,CANCELLED,RUNNING} -&gt; SCHEDULED [ -&gt; SCHEDULED ]* -&gt; RUNNING -&gt; {IDLE,CANCELLED,SCHEDULED}
* {IDLE,CANCELLED,RUNNING} -&gt; SCHEDULED [ -&gt; SCHEDULED ]* -&gt; CANCELLED
*
* anything else is invalid.
*/
@ -231,10 +231,10 @@ public class SimpleTimer2 {
* in your constructor)
*
* Other porting:
* SimpleTimer.getInstance().addEvent(new foo(), timeout) => new foo(SimpleTimer2.getInstance(), timeout)
* SimpleTimer.getInstance().addEvent(this, timeout) => schedule(timeout)
* SimpleTimer.getInstance().addEvent(foo, timeout) => foo.reschedule(timeout)
* SimpleTimer.getInstance().removeEvent(foo) => foo.cancel()
* SimpleTimer.getInstance().addEvent(new foo(), timeout) =&gt; new foo(SimpleTimer2.getInstance(), timeout)
* SimpleTimer.getInstance().addEvent(this, timeout) =&gt; schedule(timeout)
* SimpleTimer.getInstance().addEvent(foo, timeout) =&gt; foo.reschedule(timeout)
* SimpleTimer.getInstance().removeEvent(foo) =&gt; foo.cancel()
*
* There's no global locking, but for scheduling, we synchronize on this
* to reduce the chance of duplicates on the queue.

View File

@ -149,7 +149,7 @@ public abstract class SystemVersion {
}
/**
* Better than (new VersionComparator()).compare(System.getProperty("java.version"), "1.6") >= 0
* Better than (new VersionComparator()).compare(System.getProperty("java.version"), "1.6") &gt;= 0
* as it handles Android also, where java.version = "0".
*
* @return true if Java 1.6 or higher, or Android API 9 or higher
@ -159,7 +159,7 @@ public abstract class SystemVersion {
}
/**
* Better than (new VersionComparator()).compare(System.getProperty("java.version"), "1.7") >= 0
* Better than (new VersionComparator()).compare(System.getProperty("java.version"), "1.7") &gt;= 0
* as it handles Android also, where java.version = "0".
*
* @return true if Java 1.7 or higher, or Android API 19 or higher
@ -193,8 +193,8 @@ public abstract class SystemVersion {
* http://mark.koli.ch/2009/10/javas-osarch-system-property-is-the-bitness-of-the-jre-not-the-operating-system.html
* http://mark.koli.ch/2009/10/reliably-checking-os-bitness-32-or-64-bit-on-windows-with-a-tiny-c-app.html
* sun.arch.data.model not on all JVMs
* sun.arch.data.model == 64 => 64 bit processor
* sun.arch.data.model == 32 => A 32 bit JVM but could be either 32 or 64 bit processor or libs
* sun.arch.data.model == 64 =&gt; 64 bit processor
* sun.arch.data.model == 32 =&gt; A 32 bit JVM but could be either 32 or 64 bit processor or libs
* os.arch contains "64" could be 32 or 64 bit libs
*/
public static boolean is64Bit() {

View File

@ -67,7 +67,7 @@ public abstract class Translate {
*
* @param s string to be translated containing {0}
* The {0} will be replaced by the parameter.
* Single quotes must be doubled, i.e. ' -> '' in the string.
* Single quotes must be doubled, i.e. ' -&gt; '' in the string.
* @param o parameter, not translated.
* To translate parameter also, use _t("foo {0} bar", _t("baz"))
* Do not double the single quotes in the parameter.