JavaDoc: Replace <code> with {@code}.

This commit is contained in:
Andreas Schildbach 2018-03-11 16:42:14 +01:00 committed by Andreas Schildbach
parent 326e076373
commit d945822e62
16 changed files with 153 additions and 153 deletions

View file

@ -1170,10 +1170,10 @@ public class PeerGroup implements TransactionBroadcaster {
* than the current chain head, the relevant parts of the chain won't be redownloaded for you.</p>
*
* <p>This method invokes {@link PeerGroup#recalculateFastCatchupAndFilter(FilterRecalculateMode)}.
* The return value of this method is the <code>ListenableFuture</code> returned by that invocation.</p>
* The return value of this method is the {@code ListenableFuture} returned by that invocation.</p>
*
* @return a future that completes once each <code>Peer</code> in this group has had its
* <code>BloomFilter</code> (re)set.
* @return a future that completes once each {@code Peer} in this group has had its
* {@code BloomFilter} (re)set.
*/
public ListenableFuture<BloomFilter> addPeerFilterProvider(PeerFilterProvider provider) {
lock.lock();

View file

@ -39,7 +39,7 @@ import static com.google.common.base.Preconditions.*;
/**
* Handles high-level message (de)serialization for peers, acting as the bridge between the
* <code>org.bitcoinj.net</code> classes and {@link Peer}.
* {@code org.bitcoinj.net} classes and {@link Peer}.
*/
public abstract class PeerSocketHandler extends AbstractTimeoutHandler implements StreamConnection {
private static final Logger log = LoggerFactory.getLogger(PeerSocketHandler.class);

View file

@ -71,8 +71,8 @@ public abstract class PrefixedChecksummedBytes implements Serializable, Cloneabl
}
/**
* This implementation narrows the return type to <code>PrefixedChecksummedBytes</code>
* and allows subclasses to throw <code>CloneNotSupportedException</code> even though it
* This implementation narrows the return type to {@link PrefixedChecksummedBytes}
* and allows subclasses to throw {@link CloneNotSupportedException} even though it
* is never thrown by this implementation.
*/
@Override
@ -81,7 +81,7 @@ public abstract class PrefixedChecksummedBytes implements Serializable, Cloneabl
}
/**
* This implementation uses an optimized Google Guava method to compare <code>bytes</code>.
* This implementation uses an optimized Google Guava method to compare {@code bytes}.
*/
@Override
public int compareTo(PrefixedChecksummedBytes o) {

View file

@ -56,8 +56,8 @@ public class UnsafeByteArrayOutputStream extends ByteArrayOutputStream {
}
/**
* Writes <code>len</code> bytes from the specified byte array
* starting at offset <code>off</code> to this byte array output stream.
* Writes {@code len} bytes from the specified byte array
* starting at offset {@code off} to this byte array output stream.
*
* @param b the data.
* @param off the start offset in the data.
@ -82,7 +82,7 @@ public class UnsafeByteArrayOutputStream extends ByteArrayOutputStream {
/**
* Writes the complete contents of this byte array output stream to
* the specified output stream argument, as if by calling the output
* stream's write method using <code>out.write(buf, 0, count)</code>.
* stream's write method using {@code out.write(buf, 0, count)}.
*
* @param out the output stream to which to write the data.
* @throws IOException if an I/O error occurs.
@ -93,7 +93,7 @@ public class UnsafeByteArrayOutputStream extends ByteArrayOutputStream {
}
/**
* Resets the <code>count</code> field of this byte array output
* Resets the {@code count} field of this byte array output
* stream to zero, so that all currently accumulated output in the
* output stream is discarded. The output stream can be used again,
* reusing the already allocated buffer space.
@ -121,7 +121,7 @@ public class UnsafeByteArrayOutputStream extends ByteArrayOutputStream {
/**
* Returns the current size of the buffer.
*
* @return the value of the <code>count</code> field, which is the number
* @return the value of the {@code count} field, which is the number
* of valid bytes in this output stream.
* @see java.io.ByteArrayOutputStream#count
*/

View file

@ -440,9 +440,9 @@ public class DeterministicKey extends ECKey {
}
/**
* Derives a child at the given index using hardened derivation. Note: <code>index</code> is
* Derives a child at the given index using hardened derivation. Note: {@code index} is
* not the "i" value. If you want the softened derivation, then use instead
* <code>HDKeyDerivation.deriveChildKey(this, new ChildNumber(child, false))</code>.
* {@code HDKeyDerivation.deriveChildKey(this, new ChildNumber(child, false))}.
*/
public DeterministicKey derive(int child) {
return HDKeyDerivation.deriveChildKey(this, new ChildNumber(child, true));

View file

@ -104,11 +104,11 @@ public final class HDKeyDerivation {
/**
* Derives a key given the "extended" child number, ie. the 0x80000000 bit of the value that you
* pass for <code>childNumber</code> will determine whether to use hardened derivation or not.
* pass for {@code childNumber} will determine whether to use hardened derivation or not.
* Consider whether your code would benefit from the clarity of the equivalent, but explicit, form
* of this method that takes a <code>ChildNumber</code> rather than an <code>int</code>, for example:
* <code>deriveChildKey(parent, new ChildNumber(childNumber, true))</code>
* where the value of the hardened bit of <code>childNumber</code> is zero.
* of this method that takes a {@code ChildNumber} rather than an {@code int}, for example:
* {@code deriveChildKey(parent, new ChildNumber(childNumber, true))}
* where the value of the hardened bit of {@code childNumber} is zero.
*/
public static DeterministicKey deriveChildKey(DeterministicKey parent, int childNumber) {
return deriveChildKey(parent, new ChildNumber(childNumber));

View file

@ -128,10 +128,10 @@ public interface IPaymentChannelClient {
/**
* <p>Queries if the expire time proposed by server is acceptable. If <code>false</code> is return the channel
* <p>Queries if the expire time proposed by server is acceptable. If {@code false} is return the channel
* will be closed with a {@link org.bitcoinj.protocols.channels.PaymentChannelCloseException.CloseReason#TIME_WINDOW_UNACCEPTABLE}.</p>
* @param expireTime The time, in seconds, when this channel will be closed by the server. Note this is in absolute time, i.e. seconds since 1970-01-01T00:00:00.
* @return <code>true</code> if the proposed time is acceptable <code>false</code> otherwise.
* @return {@code true} if the proposed time is acceptable {@code false} otherwise.
*/
boolean acceptExpireTime(long expireTime);

View file

@ -122,7 +122,7 @@ public class PaymentChannelServer {
/**
* <p>Called when a channel is being closed and must be signed, possibly with an encrypted key.</p>
* @return A future for the (nullable) KeyParameter for the ECKey, or <code>null</code> if no key is required.
* @return A future for the (nullable) KeyParameter for the ECKey, or {@code null} if no key is required.
*/
@Nullable
ListenableFuture<KeyParameter> getUserKey();

View file

@ -36,7 +36,7 @@ import java.util.NoSuchElementException;
* blocks together. Importing block data with this tool can be a lot faster than syncing over the network, if you
* have the files available.</p>
*
* <p>In order to comply with Iterator&lt;Block>, this class swallows a lot of IOExceptions, which may result in a few
* <p>In order to comply with {@link Iterator}, this class swallows a lot of {@link IOException}s, which may result in a few
* blocks being missed followed by a huge set of orphan blocks.</p>
*
* <p>To blindly import all files which can be found in Bitcoin Core (version >= 0.8) datadir automatically,

View file

@ -40,10 +40,10 @@ import java.util.Locale;
* of consecutive zeros in the number that is displayed, and includes either a currency code or
* symbol in the formatted value to indicate which denomination was chosen.
*
* <p>When parsing <code>String</code> representations of Bitcoin monetary values, instances of
* <p>When parsing {@code String} representations of Bitcoin monetary values, instances of
* this class automatically recognize units indicators consisting of currency codes and
* symbols, including including those containing currency or metric prefixes such as
* <code>"¢"</code> or <code>"c"</code> to indicate hundredths, and interpret each number being
* {@code "¢"} or {@code "c"} to indicate hundredths, and interpret each number being
* parsed in accordance with the recognized denominational units.
*
* <p>A more detailed explanation, including examples, is in the documentation for the {@link
@ -171,7 +171,7 @@ public final class BtcAutoFormat extends BtcFormat {
return places;
}
/** Returns the <code>int</code> value indicating coin denomination. This is what causes
/** Returns the {@code int} value indicating coin denomination. This is what causes
* the number in a parsed value that lacks a units indicator to be interpreted as a quantity
* of bitcoins. */
@Override

View file

@ -82,7 +82,7 @@ public final class BtcFixedFormat extends BtcFormat {
}
/** Return the decimal-place shift for this object's unit-denomination. For example, if
* the denomination is millibitcoins, this method will return the value <code>3</code>. As
* the denomination is millibitcoins, this method will return the value {@code 3}. As
* a side-effect, prefixes the currency signs of the underlying NumberFormat object. This
* method is invoked by the superclass when formatting. The arguments are ignored because
* the denomination is fixed regardless of the value being formatted.
@ -94,14 +94,14 @@ public final class BtcFixedFormat extends BtcFormat {
}
/** Return the decimal-place shift for this object's fixed unit-denomination. For example, if
* the denomination is millibitcoins, this method will return the value <code>3</code>. */
* the denomination is millibitcoins, this method will return the value {@code 3}. */
@Override
public int scale() { return scale; }
/**
* Return the currency code that identifies the units in which values formatted and
* (by-default) parsed by this instance are denominated. For example, if the formatter's
* denomination is millibitcoins, then this method will return <code>"mBTC"</code>,
* denomination is millibitcoins, then this method will return {@code "mBTC"},
* assuming the default base currency-code is not overridden using a
* {@link BtcFormat.Builder}. */
public String code() { return prefixCode(coinCode(), scale); }
@ -109,12 +109,12 @@ public final class BtcFixedFormat extends BtcFormat {
/**
* Return the currency symbol that identifies the units in which values formatted by this
* instance are denominated. For example, when invoked on an instance denominated in
* millibitcoins, this method by default returns <code>"₥฿"</code>, depending on the
* millibitcoins, this method by default returns {@code "₥฿"}, depending on the
* locale. */
public String symbol() { return prefixSymbol(coinSymbol(), scale); }
/** Return the fractional decimal-placing used when formatting. This method returns an
* <code>int</code> array. The value of the first element is the minimum number of
* {@code int} array. The value of the first element is the minimum number of
* decimal places to be used in all cases, limited to a precision of satoshis. The value
* of each successive element is the size of an optional place-group that will be applied,
* possibly partially, if useful for expressing precision. The actual size of each group

View file

@ -69,7 +69,7 @@ import java.util.regex.Pattern;
* <li>Construct a new formatter object using one of the factory methods.
* <li>Format a value by passing it as an argument to the
* {@link BtcFormat#format(Object)} method.
* <li>Parse a value by passing a <code>String</code>-type
* <li>Parse a value by passing a {@code String}-type
* representation of it to the {@link BtcFormat#parse(String)} method.</ol>
*
* <p>For example, depending on your locale, values might be formatted
@ -96,10 +96,10 @@ import java.util.regex.Pattern;
* auto-denominating formatter is defined by its style, specified by one of the enumerated
* values of {@link BtcAutoFormat.Style}. There are two styles constants: {@link
* BtcAutoFormat.Style#CODE} (the default), and {@link BtcAutoFormat.Style#SYMBOL}. The
* difference is that the <code>CODE</code> style uses an internationally-distinct currency
* code, such as <code>"BTC"</code>, to indicate the units of denomination, while the
* <code>SYMBOL</code> style uses a possibly-ambiguous currency symbol such as
* <code>"฿"</code>.
* difference is that the {@code CODE} style uses an internationally-distinct currency
* code, such as {@code "BTC"}, to indicate the units of denomination, while the
* {@code SYMBOL} style uses a possibly-ambiguous currency symbol such as
* {@code "฿"}.
*
* <p>The denomination used when formatting will be either bitcoin, millicoin
* or microcoin, depending on the value being represented, chosen so as to minimize the number
@ -114,9 +114,9 @@ import java.util.regex.Pattern;
* defined by its scale, which is the number of places one must shift the decimal point in
* increasing precision to convert the representation of a given quantity of bitcoins into a
* representation of the same value denominated in the formatter's units. For example, a scale
* value of <code>3</code> specifies a denomination of millibitcoins, because to represent
* <code>1.0000 BTC</code>, or one bitcoin, in millibitcoins, one shifts the decimal point
* three places, that is, to <code>1000.0 mBTC</code>.
* value of {@code 3} specifies a denomination of millibitcoins, because to represent
* {@code 1.0000 BTC}, or one bitcoin, in millibitcoins, one shifts the decimal point
* three places, that is, to {@code 1000.0 mBTC}.
*
* <h3>Construction</h3>
*
@ -125,7 +125,7 @@ import java.util.regex.Pattern;
* <li>Use a {@link BtcFormat.Builder} object.</ol>
*
* <p>The factory methods are appropriate for basic use where the default
* configuration is either used or modified. The <code>Builder</code>
* configuration is either used or modified. The {@link Builder}
* class provides more control over the configuration, and gives
* access to some features not available through the factory methods,
* such as using custom formatting patterns and currency symbols.
@ -134,14 +134,14 @@ import java.util.regex.Pattern;
*
* Although formatting and parsing is performed by one of the concrete
* subclasses, you can obtain formatters using the various static factory
* methods of this abstract base class <code>BtcFormat</code>. There
* methods of this abstract base class {@link BtcFormat}. There
* are a variety of overloaded methods that allow you to obtain a
* formatter that behaves according to your needs.
*
* <p>The primary distinction is between automatic- and
* fixed-denomination formatters. By default, the
* <code>getInstance()</code> method with no arguments returns a new,
* automatic-denominating <code>BtcAutoFormat</code> instance for your
* {@code getInstance()} method with no arguments returns a new,
* automatic-denominating {@link BtcAutoFormat} instance for your
* default locale that will display exactly two fractional decimal
* places and a currency code. For example, if you happen to be in
* the USA:
@ -151,10 +151,10 @@ import java.util.regex.Pattern;
* String s = f.format(Coin.COIN); <strong>// "BTC 1.00"</strong>
* </pre></blockquote>
*
* <p>The first argument to <code>getInstance()</code> can determine
* <p>The first argument to {@code getInstance()} can determine
* whether you get an auto- or fixed-denominating formatter. If the
* type of the first argument is an <code>int</code>, then the value
* of that <code>int</code> will be interpreted as the decimal-place scale of
* type of the first argument is an {@code int}, then the value
* of that {@code int} will be interpreted as the decimal-place scale of
* the {@link BtcFixedFormat} instance that is returned, and thus will
* determine its denomination. For example, if you want to format
* values in units of microbitcoins:
@ -168,9 +168,9 @@ import java.util.regex.Pattern;
* <blockquote><pre>BtcFormat milliFormat = BtcFormat.getInstance(MILLICOIN_SCALE);</pre></blockquote>
*
* <p>Alternatively, if the type of the first argument to
* <code>getInstance()</code> is one of the enumerated values of the
* {@link BtcAutoFormat.Style} type, either <code>CODE</code> or
* <code>SYMBOL</code>, then you will get a {@link BtcAutoFormat}
* {@code getInstance()} is one of the enumerated values of the
* {@link BtcAutoFormat.Style} type, either {@link BtcAutoFormat.Style#CODE} or
* {@link BtcAutoFormat.Style#SYMBOL}, then you will get a {@link BtcAutoFormat}
* instance that uses either a currency code or symbol, respectively,
* to indicate the results of its auto-denomination.
*
@ -185,15 +185,15 @@ import java.util.regex.Pattern;
* is to use one of the factory methods that is named to indicate that characteristics of the
* new instance returned. For fixed-denomination formatters, these methods are {@link
* #getCoinInstance()}, {@link #getMilliInstance()}, and {@link #getMicroInstance()}. These
* three methods are equivalent to invoking <code>getInstance()</code> with a first argument of
* <code>0</code>, <code>3</code> and <code>6</code>, respectively. For auto-denominating
* three methods are equivalent to invoking {@code getInstance()} with a first argument of
* {@code 0}, {@code 3} and {@code 6}, respectively. For auto-denominating
* formatters the relevant factory methods are {@link #getCodeInstance()} and {@link
* #getSymbolInstance()}, which are equivalent to <code>getInstance(Style.CODE)</code>, and
* <code>getInstance(Style.SYMBOL)</code>.
* #getSymbolInstance()}, which are equivalent to {@code getInstance(Style.CODE)}, and
* {@code getInstance(Style.SYMBOL)}.
*
* <p>Regardless of how you specify whether your new formatter is to be of automatic- or
* fixed-denomination, the next (and possibly first) parameter to each of the factory methods
* is an optional <code>Locale</code> value.
* is an optional {@link Locale} value.
*
* For example, here we construct four instances for the same locale that each format
* differently the same one-bitcoin value:
@ -209,33 +209,33 @@ import java.util.regex.Pattern;
* BtcFormat.getInstance(4, Locale.GERMANY).format(Coin.COIN);
* </pre></blockquote>
*
* Omitting such a <code>Locale</code> parameter will give you a
* Omitting such a {@link Locale} parameter will give you a
* formatter for your default locale.
*
* <p>The final (and possibly only) arguments to the factory methods serve to set the default
* number of fractional decimal places that will be displayed when formatting monetary values.
* In the case of an auto-denominating formatter, this can be a single <code>int</code> value,
* In the case of an auto-denominating formatter, this can be a single {@code int} value,
* which will determine the number of fractional decimal places to be used in all cases, except
* where either (1) doing so would provide a place for fractional satoshis, or (2) that default
* value is overridden when invoking the <code>format()</code> method as described below.
* value is overridden when invoking the {@code format()} method as described below.
*
* <p>In the case of a fixed-denomination formatter, you can pass any number of
* <code>int</code> values. The first will determine the minimum number of fractional decimal
* places, and each following <code>int</code> value specifies the size of an optional group of
* {@code int} values. The first will determine the minimum number of fractional decimal
* places, and each following {@code int} value specifies the size of an optional group of
* decimal-places to be displayed only if useful for expressing precision. As with auto-denominating
* formatters, numbers will never be formatted with a decimal place that represents a
* fractional quantity of satoshis, and these defaults can be overridden by arguments to the
* <code>format()</code> method. See below for examples.
* {@code format()} method. See below for examples.
*
* <h5>The <code>Builder</code> Class</h5>
* <h5>The {@link Builder} Class</h5>
*
* A new {@link BtcFormat.Builder} instance is returned by the {@link #builder()} method. Such
* an object has methods that set the configuration parameters of a <code>BtcFormat</code>
* object. Its {@link Builder#build()} method constructs and returns a <code>BtcFormat</code> instance
* an object has methods that set the configuration parameters of a {@link BtcFormat}
* object. Its {@link Builder#build()} method constructs and returns a {@link BtcFormat} instance
* configured according to those settings.
*
* <p>In addition to setter-methods that correspond to the factory-method parameters explained
* above, a <code>Builder</code> also allows you to specify custom formatting and parsing
* above, a {@link Builder} also allows you to specify custom formatting and parsing
* patterns and currency symbols and codes. For example, rather than using the default
* currency symbol, which has the same unicode character point as the national currency symbol of
* Thailand, some people prefer to use a capital letter "B" with a vertical overstrike.
@ -248,7 +248,7 @@ import java.util.regex.Pattern;
* String out = f.format(COIN); <strong>// "B⃦1.00" depending on locale</strong>
* </pre></blockquote>
*
* The <code>Builder</code> methods are chainable. So, for example, if you are
* The {@link Builder} methods are chainable. So, for example, if you are
* deferential to ISO 4217, you might construct a formatter in a single line this way:
*
* <blockquote><pre>
@ -267,18 +267,18 @@ import java.util.regex.Pattern;
* number of satoshis, while a {@link java.math.BigDecimal} is interpreted as representing a
* number of bitcoins. A value having a fractional amount of satoshis is rounded to the
* nearest whole satoshi at least, and possibly to a greater unit depending on the number of
* fractional decimal-places displayed. The <code>format()</code> method will not accept an
* argument whose type is <code>String</code>, <code>Float</code> nor <code>Double</code>.
* fractional decimal-places displayed. The {@code format()} method will not accept an
* argument whose type is {@link String}, {@link Float} nor {@link Double}.
*
* <p>Subsequent to the monetary value to be formatted, the {@link #format(Object)} method also
* accepts as arguments optional <code>int</code> values that specify the number of decimal
* accepts as arguments optional {@code int} values that specify the number of decimal
* places to use to represent the fractional portion of the number. This overrides the
* default, and enables a single formatter instance to be reused, formatting different values
* that require different numbers of fractional decimal places. These parameters have the same
* meaning as those that set the default values in the factory methods as described above.
* Namely, a single <code>int</code> value determines the minimum number of fractional decimal
* Namely, a single {@code int} value determines the minimum number of fractional decimal
* places that will be used in all cases, to a precision limit of satoshis. Instances of
* {@link BtcFixedFormat} also accept a variable-length sequence of additional <code>int</code>
* {@link BtcFixedFormat} also accept a variable-length sequence of additional {@code int}
* values, each of which specifies the size of a group of fractional decimal-places to be used
* in addition to all preceding places, only if useful to express precision, and only to a
* maximum precision of satoshis. For example:
@ -330,8 +330,8 @@ import java.util.regex.Pattern;
* </pre></blockquote>
*
* <p>When using a fixed-denomination formatter whose scale can be expressed as a standard
* "metric" prefix, you can invoke the <code>code()</code> and <code>symbol()</code> methods to
* obtain a <code>String</code> whose value is the appropriate currency code or symbol,
* "metric" prefix, you can invoke the {@code code()} and {@code symbol()} methods to
* obtain a {@link String} whose value is the appropriate currency code or symbol,
* respectively, for that formatter.
*
* <blockquote><pre>
@ -392,11 +392,11 @@ import java.util.regex.Pattern;
*
* <h3>Parsing</h3>
*
* <p>The {@link #parse(String)} method accepts a <code>String</code> argument, and returns a
* <p>The {@link #parse(String)} method accepts a {@link String} argument, and returns a
* {@link Coin}-type value. The difference in parsing behavior between instances of {@link
* BtcFixedFormat} and {@link BtcAutoFormat} is analogous to the difference in formatting
* behavior between instances of those classes. Instances of {@link BtcAutoFormat} recognize
* currency codes and symbols in the <code>String</code> being parsed, and interpret them as
* currency codes and symbols in the {@link String} being parsed, and interpret them as
* indicators of the units in which the number being parsed is denominated. On the other hand,
* instances of {@link BtcFixedFormat} by default recognize no codes nor symbols, but rather
* interpret every number as being denominated in the units that were specified when
@ -408,21 +408,21 @@ import java.util.regex.Pattern;
* {@link BtcAutoFormat} configured with applicable non-default pattern) will recognize a
* variety of currency symbols and codes, including all standard international (metric)
* prefixes from micro to mega. For example, denominational units of microcoins may be
* specified by <code>µ฿</code>, <code>u฿</code>, <code>µB⃦</code>, <code>µɃ</code>,
* <code>µBTC</code> or other appropriate permutations of those characters. Additionally, if
* specified by {@code µ฿}, {@code u฿}, {@code µB⃦}, {@code µɃ},
* {@code µBTC} or other appropriate permutations of those characters. Additionally, if
* either or both of a custom currency code or symbol is configured using {@link
* BtcFormat.Builder#code} or {@link BtcFormat.Builder#code}, then such code or symbol will
* be recognized in addition to those recognized by default..
*
* <p>Instances of this class that recognize currency signs will recognize both currency
* symbols and codes, regardless of which that instance uses for formatting. However, if the
* style is <code>CODE</code> (and unless overridden by a custom pattern) then a space character must
* separate the units indicator from the number. When parsing with a <code>SYMBOL</code>-style
* <code>BtcFormat</code> instance, on the other hand, whether or not the units indicator must
* style is {@code CODE} (and unless overridden by a custom pattern) then a space character must
* separate the units indicator from the number. When parsing with a {@code SYMBOL}-style
* {@code BtcFormat} instance, on the other hand, whether or not the units indicator must
* be separated by a space from the number is determined by the locale. The {@link
* BtcFormat#pattern()} method returns a representation of the pattern that
* can be examined to determine whether a space must separate currency signs from numbers in
* parsed <code>String</code>s.
* parsed {@link String}s.
*
* <p>When parsing, if the currency-units indicator is absent, then a {@link BtcAutoFormat}
* instance will infer a denomination of bitcoins while a {@link BtcFixedFormat} will infer the
@ -431,10 +431,10 @@ import java.util.regex.Pattern;
* units indicator, that space must be present in the String to be parsed, even if the units
* indicator is absent.
*
* <p>The <code>parse()</code> method returns an instance of the
* <p>The {@code parse()} method returns an instance of the
* {@link Coin} class. Therefore, attempting to parse a value greater
* than the maximum that a <code>Coin</code> object can represent will
* raise a <code>ParseException</code>, as will any other detected
* than the maximum that a {@code Coin} object can represent will
* raise a {@code ParseException}, as will any other detected
* parsing error.
*
* <h3>Limitations</h3>
@ -505,16 +505,16 @@ public abstract class BtcFormat extends Format {
protected final List<Integer> decimalGroups;
/* Scale is the number of decimal-places difference from same value in bitcoins */
/** A constant useful for specifying a denomination of bitcoins, the <code>int</code> value
* <code>0</code>. */
/** A constant useful for specifying a denomination of bitcoins, the {@code int} value
* {@code 0}. */
public static final int COIN_SCALE = 0;
/** A constant useful for specifying a denomination of millibitcoins, the <code>int</code>
* value <code>3</code>. */
/** A constant useful for specifying a denomination of millibitcoins, the {@code int}
* value {@code 3}. */
public static final int MILLICOIN_SCALE = 3;
/** A constant useful for specifying a denomination of microbitcoins, the <code>int</code>
* value <code>6</code>. */
/** A constant useful for specifying a denomination of microbitcoins, the {@code int}
* value {@code 6}. */
public static final int MICROCOIN_SCALE = 6;
/** Return the number of decimal places by which any value denominated in the
@ -526,12 +526,12 @@ public abstract class BtcFormat extends Format {
/**
* <p>This class constructs new instances of {@link BtcFormat}, allowing for the
* configuration of those instances before they are constructed. After obtaining a
* <code>Builder</code> object from the {@link BtcFormat#builder()} method, invoke the
* {@code Builder} object from the {@link BtcFormat#builder()} method, invoke the
* necessary setter methods to obtain your desired configuration. Finaly, the {@link
* #build()} method returns a new <code>BtcFormat</code> object that has the specified
* #build()} method returns a new {@code BtcFormat} object that has the specified
* configuration.
*
* <p>All the setter methods override defaults. Invoking <code>build()</code> without invoking any
* <p>All the setter methods override defaults. Invoking {@code build()} without invoking any
* of the setting methods is equivalent to invoking {@link BtcFormat#getInstance()} with no arguments.
*
* <p>Each setter methods returns the same instance on which it is invoked,
@ -562,11 +562,11 @@ public abstract class BtcFormat extends Format {
private Builder() {}
/** Specify the new <code>BtcFormat</code> is to be automatically-denominating.
* The argument determines which of either codes or symbols the new <code>BtcFormat</code>
/** Specify the new {@code BtcFormat} is to be automatically-denominating.
* The argument determines which of either codes or symbols the new {@code BtcFormat}
* will use by default to indicate the denominations it chooses when formatting values.
*
* <p>Note that the <code>Style</code> argument specifies the
* <p>Note that the {@code Style} argument specifies the
* <em>default</em> style, which is overridden by invoking
* either {@link #pattern(String)} or {@link #localizedPattern(String)}.
*
@ -584,24 +584,24 @@ public abstract class BtcFormat extends Format {
* This is equivalent to the {@link #minimumFractionDigits(int)} method, but named
* appropriately for the context of generating {@link BtcAutoFormat} instances.
*
* <p>If neither this method nor <code>minimumFactionDigits()</code> is invoked, the default value
* will be <code>2</code>. */
* <p>If neither this method nor {@code minimumFactionDigits()} is invoked, the default value
* will be {@code 2}. */
public Builder fractionDigits(int val) { return minimumFractionDigits(val); }
/** Specify a fixed-denomination of units to use when formatting and parsing values.
* The argument specifies the number of decimal places, in increasing
* precision, by which each formatted value will differ from that same value
* denominated in bitcoins. For example, a denomination of millibitcoins is specified
* with a value of <code>3</code>.
* with a value of {@code 3}.
*
* <p>The <code>BtcFormat</code> class provides appropriately named
* <code>int</code>-type constants for the three common values, {@link BtcFormat#COIN_SCALE},
* <p>The {@code BtcFormat} class provides appropriately named
* {@code int}-type constants for the three common values, {@link BtcFormat#COIN_SCALE},
* {@link BtcFormat#MILLICOIN_SCALE} {@link BtcFormat#MICROCOIN_SCALE}.
*
* <p>If neither this method nor {@link #style(BtcAutoFormat.Style)} is invoked on a
* <code>Builder</code>, then the <code>BtcFormat</code> will default to a
* {@link Builder}, then the {@link BtcFormat} will default to a
* fixed-denomination of bitcoins, equivalent to invoking this method with an argument
* of <code>0</code>. */
* of {@code 0}. */
public Builder scale(int val) {
if (variant == Variant.AUTO)
throw new IllegalStateException("You cannot invoke both scale() and style()");
@ -614,8 +614,8 @@ public abstract class BtcFormat extends Format {
* This method is equivalent to {@link #fractionDigits(int)}, but named appropriately for
* the context of generating a fixed-denomination formatter.
*
* <p>If neither this method nor <code>fractionDigits()</code> is invoked, the default value
* will be <code>2</code>. */
* <p>If neither this method nor {@code fractionDigits()} is invoked, the default value
* will be {@code 2}. */
public Builder minimumFractionDigits(int val) { minimumFractionDigits = val; return this; }
/** Specify the sizes of a variable number of optional decimal-place groups in the
@ -625,7 +625,7 @@ public abstract class BtcFormat extends Format {
* satoshis.
*
* <p>If this method is not invoked, then the number of fractional decimal places will
* be limited to the value passed to {@link #minimumFractionDigits}, or <code>2</code>
* be limited to the value passed to {@link #minimumFractionDigits}, or {@code 2}
* if that method is not invoked. */
public Builder fractionGroups(int... val) { fractionGroups = val; return this; }
@ -635,7 +635,7 @@ public abstract class BtcFormat extends Format {
/** Specify a currency symbol to be used in the denomination-unit indicators
* of formatted values. This method only sets the symbol, but does not cause
* it to be used. You must also invoke either <code>style(SYMBOL)</code>, or else apply
* it to be used. You must also invoke either {@code style(SYMBOL)}, or else apply
* a custom pattern that includes a single currency-sign character by invoking either
* {@link #pattern(String)} or {@link #localizedPattern(String)}.
*
@ -645,7 +645,7 @@ public abstract class BtcFormat extends Format {
/** Specify a custom currency code to be used in the denomination-unit indicators
* of formatted values. This method only sets the code, but does not cause
* it to be used. You must also invoke either <code>style(CODE)</code>, or else apply
* it to be used. You must also invoke either {@code style(CODE)}, or else apply
* a custom pattern that includes a double currency-sign character by invoking either
* {@link #pattern(String)} or {@link #localizedPattern(String)}.
*
@ -684,7 +684,7 @@ public abstract class BtcFormat extends Format {
* pattern is identical to the patterns used by the {@link java.text.DecimalFormat}
* class.
*
* <p>The pattern is localized according to the locale of the <code>BtcFormat</code>
* <p>The pattern is localized according to the locale of the {@code BtcFormat}
* instance, the symbols for which can be examined by inspecting the {@link
* java.text.DecimalFormatSymbols} object returned by {@link BtcFormat#symbols()}.
* So, for example, if you are in Germany, then the non-localized pattern of
@ -715,7 +715,7 @@ public abstract class BtcFormat extends Format {
}
/** Return a new {@link BtcFormat} instance. The object returned will be configured according
* to the state of this <code>Builder</code> instance at the time this method is invoked. */
* to the state of this {@code Builder} instance at the time this method is invoked. */
public BtcFormat build() {
BtcFormat f = variant.newInstance(this);
if (symbol != "" || code != "") { synchronized(f.numberFormat) {
@ -762,7 +762,7 @@ public abstract class BtcFormat extends Format {
/**
* Return a new instance of this class using all defaults. The returned formatter will
* auto-denominate values so as to minimize zeros without loss of precision and display a
* currency code, for example "<code>BTC</code>", to indicate that denomination. The
* currency code, for example "{@code BTC}", to indicate that denomination. The
* returned object will uses the default locale for formatting the number and placement of
* the currency-code. Two fractional decimal places will be displayed in all formatted numbers.
*/
@ -770,14 +770,14 @@ public abstract class BtcFormat extends Format {
/**
* Return a new auto-denominating instance that will indicate units using a currency
* symbol, for example, <code>"฿"</code>. Formatting and parsing will be done
* symbol, for example, {@code "฿"}. Formatting and parsing will be done
* according to the default locale.
*/
public static BtcFormat getSymbolInstance() { return getSymbolInstance(defaultLocale()); }
/**
* Return a new auto-denominating instance that will indicate units using a currency
* code, for example, <code>"BTC"</code>. Formatting and parsing will be done
* code, for example, {@code "BTC"}. Formatting and parsing will be done
* according to the default locale.
*/
public static BtcFormat getCodeInstance() { return getCodeInstance(defaultLocale()); }
@ -785,7 +785,7 @@ public abstract class BtcFormat extends Format {
/**
* Return a new symbol-style auto-formatter with the given number of fractional decimal
* places. Denominational units will be indicated using a currency symbol, for example,
* <code>"฿"</code>. The returned object will format the fraction-part of numbers using
* {@code "฿"}. The returned object will format the fraction-part of numbers using
* the given number of decimal places, or fewer as necessary to avoid giving a place to
* fractional satoshis. Formatting and parsing will be done according to the default
* locale.
@ -797,7 +797,7 @@ public abstract class BtcFormat extends Format {
/**
* Return a new code-style auto-formatter with the given number of fractional decimal
* places. Denominational units will be indicated using a currency code, for example,
* <code>"BTC"</code>. The returned object will format the fraction-part of numbers using
* {@code "BTC"}. The returned object will format the fraction-part of numbers using
* the given number of decimal places, or fewer as necessary to avoid giving a place to
* fractional satoshis. Formatting and parsing will be done according to the default
* locale.
@ -809,14 +809,14 @@ public abstract class BtcFormat extends Format {
/**
* Return a new code-style auto-formatter for the given locale. The returned object will
* select denominational units based on each value being formatted, and will indicate those
* units using a currency code, for example, <code>"mBTC"</code>.
* units using a currency code, for example, {@code "mBTC"}.
*/
public static BtcFormat getInstance(Locale locale) { return getCodeInstance(locale); }
/**
* Return a new code-style auto-formatter for the given locale. The returned object will
* select denominational units based on each value being formatted, and will indicate those
* units using a currency code, for example, <code>"mBTC"</code>.
* units using a currency code, for example, {@code "mBTC"}.
*/
public static BtcFormat getCodeInstance(Locale locale) { return getInstance(CODE, locale); }
@ -824,7 +824,7 @@ public abstract class BtcFormat extends Format {
* Return a new code-style auto-formatter for the given locale with the given number of
* fraction places. The returned object will select denominational units based on each
* value being formatted, and will indicate those units using a currency code, for example,
* <code>"mBTC"</code>. The returned object will format the fraction-part of numbers using
* {@code "mBTC"}. The returned object will format the fraction-part of numbers using
* the given number of decimal places, or fewer as necessary to avoid giving a place to
* fractional satoshis.
*/
@ -836,7 +836,7 @@ public abstract class BtcFormat extends Format {
* Return a new code-style auto-formatter for the given locale with the given number of
* fraction places. The returned object will select denominational units based on each
* value being formatted, and will indicate those units using a currency code, for example,
* <code>"mBTC"</code>. The returned object will format the fraction-part of numbers using
* {@code "mBTC"}. The returned object will format the fraction-part of numbers using
* the given number of decimal places, or fewer as necessary to avoid giving a place to
* fractional satoshis.
*/
@ -847,7 +847,7 @@ public abstract class BtcFormat extends Format {
/**
* Return a new symbol-style auto-formatter for the given locale. The returned object will
* select denominational units based on each value being formatted, and will indicate those
* units using a currency symbol, for example, <code>"µ฿"</code>.
* units using a currency symbol, for example, {@code "µ฿"}.
*/
public static BtcFormat getSymbolInstance(Locale locale) {
return getInstance(SYMBOL, locale);
@ -857,7 +857,7 @@ public abstract class BtcFormat extends Format {
* Return a new symbol-style auto-formatter for the given locale with the given number of
* fraction places. The returned object will select denominational units based on each
* value being formatted, and will indicate those units using a currency symbol, for example,
* <code>"µ฿"</code>. The returned object will format the fraction-part of numbers using
* {@code "µ฿"}. The returned object will format the fraction-part of numbers using
* the given number of decimal places, or fewer as necessary to avoid giving a place to
* fractional satoshis.
*/
@ -868,7 +868,7 @@ public abstract class BtcFormat extends Format {
/**
* Return a new auto-denominating formatter. The returned object will indicate the
* denominational units of formatted values using either a currency symbol, such as,
* <code>"฿"</code>, or code, such as <code>"mBTC"</code>, depending on the value of
* {@code "฿"}, or code, such as {@code "mBTC"}, depending on the value of
* the argument. Formatting and parsing will be done according to the default locale.
*/
public static BtcFormat getInstance(Style style) { return getInstance(style, defaultLocale()); }
@ -876,8 +876,8 @@ public abstract class BtcFormat extends Format {
/**
* Return a new auto-denominating formatter with the given number of fractional decimal
* places. The returned object will indicate the denominational units of formatted values
* using either a currency symbol, such as, <code>"฿"</code>, or code, such as
* <code>"mBTC"</code>, depending on the value of the first argument. The returned object
* using either a currency symbol, such as, {@code "฿"}, or code, such as
* {@code "mBTC"}, depending on the value of the first argument. The returned object
* will format the fraction-part of numbers using the given number of decimal places, or
* fewer as necessary to avoid giving a place to fractional satoshis. Formatting and
* parsing will be done according to the default locale.
@ -890,7 +890,7 @@ public abstract class BtcFormat extends Format {
* Return a new auto-formatter with the given style for the given locale.
* The returned object that will auto-denominate each formatted value, and
* will indicate that denomination using either a currency code, such as
* "<code>BTC</code>", or symbol, such as "<code>฿</code>", depending on the value
* {@code "BTC"}, or symbol, such as {@code "฿"}, depending on the value
* of the first argument.
* <p>The number of fractional decimal places in formatted number will be two, or fewer
* as necessary to avoid giving a place to fractional satoshis.
@ -903,7 +903,7 @@ public abstract class BtcFormat extends Format {
* Return a new auto-formatter for the given locale with the given number of fraction places.
* The returned object will automatically-denominate each formatted
* value, and will indicate that denomination using either a currency code,
* such as <code>"mBTC"</code>, or symbol, such as "<code>฿</code>",
* such as {@code "mBTC"}, or symbol, such as {@code "฿"},
* according to the given style argument. It will format each number
* according to the given locale.
*
@ -936,7 +936,7 @@ public abstract class BtcFormat extends Format {
* returned object will format and parse values according to the default locale, and will
* format the fraction part of numbers with at least two decimal places. The sizes of
* additional groups of decimal places can be specified by a variable number of
* <code>int</code> arguments. Each optional decimal-place group will be applied only if
* {@code int} arguments. Each optional decimal-place group will be applied only if
* useful for expressing precision, and will be only partially applied if necessary to
* avoid giving a place to fractional satoshis.
*/
@ -1099,7 +1099,7 @@ public abstract class BtcFormat extends Format {
* of the shift from coin-denomination in increasingly-precise decimal places. The third
* parameter is the minimum number of fractional decimal places to use. The third argument
* specifies the minimum number of fractional decimal places in formatted numbers. The
* last argument is a <code>List</code> of <code>Integer</code> values, each of which
* last argument is a {@code List} of {@link Integer} values, each of which
* specifies the size of an additional group of fractional decimal places to use as
* necessary to avoid rounding, down to a maximum precision of satoshis.
*/
@ -1131,13 +1131,13 @@ public abstract class BtcFormat extends Format {
/**
* Formats a bitcoin value as a number and possibly a units indicator and appends the
* resulting text to the given string buffer. The type of monetary value argument can be
* any one of any of the following classes: <code>{@link Coin}</code>,
* <code>Integer</code>, <code>Long</code>, <code>BigInteger</code>,
* <code>BigDecimal</code>. Numeric types that can represent only an integer are interpreted
* as that number of satoshis. The value of a <code>BigDecimal</code> is interpreted as that
* any one of any of the following classes: {@link Coin},
* {@link Integer}, {@link Long}, {@link BigInteger},
* {@link BigDecimal}. Numeric types that can represent only an integer are interpreted
* as that number of satoshis. The value of a {@link BigDecimal} is interpreted as that
* number of bitcoins, rounded to the nearest satoshi as necessary.
*
* @return the <code>StringBuffer</code> passed in as <code>toAppendTo</code>
* @return the {@link StringBuffer} passed in as {@code toAppendTo}
*/
@Override
public StringBuffer format(Object qty, StringBuffer toAppendTo, FieldPosition pos) {
@ -1146,11 +1146,11 @@ public abstract class BtcFormat extends Format {
/**
* Formats a bitcoin value as a number and possibly a units indicator to a
* <code>String</code>.The type of monetary value argument can be any one of any of the
* following classes: <code>{@link Coin}</code>, <code>Integer</code>, <code>Long</code>,
* <code>BigInteger</code>, <code>BigDecimal</code>. Numeric types that can represent only
* {@link String}.The type of monetary value argument can be any one of any of the
* following classes: {@link Coin}, {@link Integer}, {@link Long},
* {@link BigInteger}, {@link BigDecimal}. Numeric types that can represent only
* an integer are interpreted as that number of satoshis. The value of a
* <code>BigDecimal</code> is interpreted as that number of bitcoins, rounded to the
* {@link BigDecimal} is interpreted as that number of bitcoins, rounded to the
* nearest satoshi as necessary.
*
* @param minDecimals The minimum number of decimal places in the fractional part of the formatted number
@ -1164,10 +1164,10 @@ public abstract class BtcFormat extends Format {
/**
* Formats a bitcoin value as a number and possibly a units indicator and appends the
* resulting text to the given string buffer. The type of monetary value argument can be
* any one of any of the following classes: <code>{@link Coin}</code>,
* <code>Integer</code>, <code>Long</code>, <code>BigInteger</code>,
* <code>BigDecimal</code>. Numeric types that can represent only an integer are interpreted
* as that number of satoshis. The value of a <code>BigDecimal</code> is interpreted as that
* any one of any of the following classes: {@link Coin},
* {@link Integer}, {@link Long}, {@link BigInteger},
* {@link BigDecimal}. Numeric types that can represent only an integer are interpreted
* as that number of satoshis. The value of a {@link BigDecimal} is interpreted as that
* number of bitcoins, rounded to the nearest satoshi as necessary.
*
* @param minDecimals The minimum number of decimal places in the fractional part of the formatted number
@ -1195,7 +1195,7 @@ public abstract class BtcFormat extends Format {
}
/**
* Return the denomination for formatting the given value. The returned <code>int</code>
* Return the denomination for formatting the given value. The returned {@code int}
* is the size of the decimal-place shift between the given Bitcoin-value denominated in
* bitcoins and that same value as formatted. A fixed-denomination formatter will ignore
* the arguments.
@ -1296,7 +1296,7 @@ public abstract class BtcFormat extends Format {
// ****** PARSING *****
/**
* Parse a <code>String</code> representation of a Bitcoin monetary value. Returns a
* Parse a {@link String} representation of a Bitcoin monetary value. Returns a
* {@link org.bitcoinj.core.Coin} object that represents the parsed value.
* @see java.text.NumberFormat */
@Override
@ -1338,7 +1338,7 @@ public abstract class BtcFormat extends Format {
}
/** Set both the currency symbol and international code of the underlying {@link
* java.text.NumberFormat} object to the value of the given <code>String</code>.
* java.text.NumberFormat} object to the value of the given {@link String}.
* This method is invoked in the process of parsing, not formatting.
*
* Only invoke this from code synchronized on the value of the first argument, and don't
@ -1383,7 +1383,7 @@ public abstract class BtcFormat extends Format {
);
}
/** Parse a <code>String</code> representation of a Bitcoin monetary value. If this
/** Parse a {@link String} representation of a Bitcoin monetary value. If this
* object's pattern includes a currency sign, either symbol or code, as by default is true
* for instances of {@link BtcAutoFormat} and false for instances of {@link
* BtcFixedFormat}, then denominated (i.e., prefixed) currency signs in the parsed String
@ -1437,7 +1437,7 @@ public abstract class BtcFormat extends Format {
return coin;
}
/** Parse a <code>String</code> representation of a Bitcoin monetary value. If this
/** Parse a {@link String} representation of a Bitcoin monetary value. If this
* object's pattern includes a currency sign, either symbol or code, as by default is true
* for instances of {@link BtcAutoFormat} and false for instances of {@link
* BtcFixedFormat}, then denominated (i.e., prefixed) currency signs in the parsed String

View file

@ -333,11 +333,11 @@ public class DeterministicKeyChain implements EncryptableKeyChain {
}
/**
* Creates a deterministic key chain from a watched or spendable account key. If <code>isWatching</code> flag is set,
* Creates a deterministic key chain from a watched or spendable account key. If {@code isWatching} flag is set,
* then creates a deterministic key chain that watches the given (public only) root key. You can use this to calculate
* balances and generally follow along, but spending is not possible with such a chain. If it is not set, then this
* creates a deterministic key chain that allows spending. If <code>isFollowing</code> flag is set(only allowed
* if <code>isWatching</code> is set) then this keychain follows some other keychain. In a married wallet following
* creates a deterministic key chain that allows spending. If {@code isFollowing} flag is set(only allowed
* if {@code isWatching} is set) then this keychain follows some other keychain. In a married wallet following
* keychain represents "spouse's" keychain.
*/
public DeterministicKeyChain(DeterministicKey key, boolean isFollowing, boolean isWatching) {
@ -358,7 +358,7 @@ public class DeterministicKeyChain implements EncryptableKeyChain {
}
/**
* <p>Creates a deterministic key chain with the given watch key. If <code>isFollowing</code> flag is set then this keychain follows
* <p>Creates a deterministic key chain with the given watch key. If {@code isFollowing} flag is set then this keychain follows
* some other keychain. In a married wallet following keychain represents "spouse's" keychain.</p>
* <p>Watch key has to be an account key.</p>
*/
@ -670,7 +670,7 @@ public class DeterministicKeyChain implements EncryptableKeyChain {
}
/**
* <p>An alias for <code>getKeyByPath(getAccountPath())</code>.</p>
* <p>An alias for {@code getKeyByPath(getAccountPath())}.</p>
*
* <p>Use this when you would like to create a watching key chain that follows this one, but can't spend money from it.
* The returned key can be serialized and then passed into {@link #watch(org.bitcoinj.crypto.DeterministicKey)}

View file

@ -81,7 +81,7 @@ public class MarriedKeyChain extends DeterministicKeyChain {
}
/**
* Threshold, or <code>(followingKeys.size() + 1) / 2 + 1)</code> (majority) if unspecified.</p>
* Threshold, or {@code (followingKeys.size() + 1) / 2 + 1)} (majority) if unspecified.</p>
* <p>IMPORTANT: As of Bitcoin Core 0.9 all multisig transactions which require more than 3 public keys are non-standard
* and such spends won't be processed by peers with default settings, essentially making such transactions almost
* nonspendable</p>

View file

@ -94,14 +94,14 @@ public class ChannelConnectionTest extends TestWithWallet {
public IPaymentChannelClient.ClientChannelProperties clientChannelProperties;
/**
* Returns <code>true</code> if we are using a protocol version that requires the exchange of refunds.
* Returns {@code true} if we are using a protocol version that requires the exchange of refunds.
*/
private boolean useRefunds() {
return clientChannelProperties.versionSelector() == VERSION_1;
}
/**
* Returns <code>true</code> if the contract being used is a multisig contract
* Returns {@code true} if the contract being used is a multisig contract
* @return
*/
private boolean isMultiSigContract() {

View file

@ -71,7 +71,7 @@ public class PaymentChannelStateTest extends TestWithWallet {
public PaymentChannelClient.VersionSelector versionSelector;
/**
* Returns <code>true</code> if we are using a protocol version that requires the exchange of refunds.
* Returns {@code true} if we are using a protocol version that requires the exchange of refunds.
*/
private boolean useRefunds() {
return versionSelector == PaymentChannelClient.VersionSelector.VERSION_1;