Changeset 4b2715c


Ignore:
Timestamp:
Dec 2, 2014 1:30:31 PM (6 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
fb64118
Parents:
f1e9f5d4
Message:

RouterInfo?: Add convenience method getVersion()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/data/router/RouterInfo.java

    rf1e9f5d4 r4b2715c  
    260260    public String getOption(String opt) {
    261261        return _options.getProperty(opt);
     262    }
     263
     264    /**
     265     * For convenience, the same as getOption("router.version"),
     266     * but returns "0" if unset.
     267     *
     268     * @return non-null, "0" if unknown.
     269     * @since 0.9.18
     270     */
     271    public String getVersion() {
     272        String rv = _options.getProperty("router.version");
     273        return rv != null ? rv : "0";
    262274    }
    263275
Note: See TracChangeset for help on using the changeset viewer.