Changeset 14039 in josm for trunk/src


Ignore:
Timestamp:
2018-07-20T21:54:42+02:00 (6 years ago)
Author:
Don-vip
Message:

see #16498 - convert one more unit test to Java

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java

    r13493 r14039  
    77import java.text.MessageFormat;
    88import java.text.ParseException;
     9import java.util.ArrayList;
    910import java.util.Collection;
    1011import java.util.Collections;
     
    4344    /** the bounding box this query is restricted to. null, if no restriction to a bounding box applies */
    4445    private Bounds bounds;
    45 
     46    /** the date after which changesets have been closed this query is restricted to. null, if no restriction to closure date applies */
    4647    private Date closedAfter;
     48    /** the date before which changesets have been created this query is restricted to. null, if no restriction to creation date applies */
    4749    private Date createdBefore;
    4850    /** indicates whether only open changesets are queried. null, if no restrictions regarding open changesets apply */
    4951    private Boolean open;
    50     /** indicates whether only closed changesets are queried. null, if no restrictions regarding open changesets apply */
     52    /** indicates whether only closed changesets are queried. null, if no restrictions regarding closed changesets apply */
    5153    private Boolean closed;
    5254    /** a collection of changeset ids to query for */
     
    124126    public boolean isRestrictedToPartiallyIdentifiedUser() {
    125127        return userName != null;
     128    }
     129
     130    /**
     131     * Replies true/false if this query is restricted to changesets which are or aren't open.
     132     *
     133     * @return whether changesets should or should not be open, or {@code null} if there is no restriction
     134     * @since 14039
     135     */
     136    public Boolean getRestrictionToOpen() {
     137        return open;
     138    }
     139
     140    /**
     141     * Replies true/false if this query is restricted to changesets which are or aren't closed.
     142     *
     143     * @return whether changesets should or should not be closed, or {@code null} if there is no restriction
     144     * @since 14039
     145     */
     146    public Boolean getRestrictionToClosed() {
     147        return closed;
     148    }
     149
     150    /**
     151     * Replies the date after which changesets have been closed this query is restricted to.
     152     *
     153     * @return the date after which changesets have been closed this query is restricted to.
     154     *         {@code null}, if no restriction to closure date applies
     155     * @since 14039
     156     */
     157    public Date getClosedAfter() {
     158        return closedAfter;
     159    }
     160
     161    /**
     162     * Replies the date before which changesets have been created this query is restricted to.
     163     *
     164     * @return the date before which changesets have been created this query is restricted to.
     165     *         {@code null}, if no restriction to creation date applies
     166     * @since 14039
     167     */
     168    public Date getCreatedBefore() {
     169        return createdBefore;
     170    }
     171
     172    /**
     173     * Replies the list of additional changeset ids to query.
     174     * @return the list of additional changeset ids to query (never null)
     175     * @since 14039
     176     */
     177    public final Collection<Long> getAdditionalChangesetIds() {
     178        return changesetIds != null ? new ArrayList<>(changesetIds) : Collections.emptyList();
     179    }
     180
     181    /**
     182     * Replies the bounding box this query is restricted to.
     183     * @return the bounding box this query is restricted to. null, if no restriction to a bounding box applies
     184     * @since 14039
     185     */
     186    public final Bounds getBounds() {
     187        return bounds;
    126188    }
    127189
Note: See TracChangeset for help on using the changeset viewer.