sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Desruisseaux (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SIS-172) Replace boolean argument in AbstractEnvelope.contains and intersects
Date Tue, 01 Apr 2014 02:54:14 GMT
Martin Desruisseaux created SIS-172:
---------------------------------------

             Summary: Replace boolean argument in AbstractEnvelope.contains and intersects
                 Key: SIS-172
                 URL: https://issues.apache.org/jira/browse/SIS-172
             Project: Spatial Information Systems
          Issue Type: Task
          Components: Referencing
            Reporter: Martin Desruisseaux
            Assignee: Martin Desruisseaux
            Priority: Minor


The {{AbstractEnvelope}} class provides the following methods:

* {{boolean contains(Envelope envelope, boolean edgesInclusive)}}
* {{boolean intersects(Envelope envelope, boolean edgesInclusive)}}

We should probably replace the boolean argument by something like the following enumeration:

{code:java}
public enum EdgeInclusion {
    /**
     * All edges are inclusive.
     * This is the default policy for {{Envelope}}.
     */
    ALL,

    /**
     * All edges are exclusive.
     */
    NONE,

    /**
     * Edges defined by the lower corner are inclusive,
     * while edges defined by the upper corner are exclusive.
     * This is the usual policy in Java2D.
     */
    LOWER,

    /**
     * Edges defined by the upper corner are inclusive,
     * while edges defined by the lower corner are exclusive.
     * This policy is defined for completeness but rarely used.
     */
    UPPER
}
{code}

The policy used in the majority of cases is the {{ALL}} one. Consequently we should provide
convenience methods expecting only an {{Envelope}} argument and using that mode by default.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message