Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D454B200B9D for ; Thu, 13 Oct 2016 18:52:14 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D30AD160AE4; Thu, 13 Oct 2016 16:52:14 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 27388160AD2 for ; Thu, 13 Oct 2016 18:52:14 +0200 (CEST) Received: (qmail 84862 invoked by uid 500); 13 Oct 2016 16:52:13 -0000 Mailing-List: contact commits-help@sis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: sis-dev@sis.apache.org Delivered-To: mailing list commits@sis.apache.org Received: (qmail 84853 invoked by uid 99); 13 Oct 2016 16:52:13 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Oct 2016 16:52:13 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id BCEBC1806F7 for ; Thu, 13 Oct 2016 16:52:12 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id dgDnCm16YYGj for ; Thu, 13 Oct 2016 16:52:11 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 35BEF5FB37 for ; Thu, 13 Oct 2016 16:52:11 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 5089CE03F5 for ; Thu, 13 Oct 2016 16:52:10 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 4EB1B3A039C for ; Thu, 13 Oct 2016 16:52:10 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r1764734 - /sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java Date: Thu, 13 Oct 2016 16:52:10 -0000 To: commits@sis.apache.org From: desruisseaux@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20161013165210.4EB1B3A039C@svn01-us-west.apache.org> archived-at: Thu, 13 Oct 2016 16:52:15 -0000 Author: desruisseaux Date: Thu Oct 13 16:52:10 2016 New Revision: 1764734 URL: http://svn.apache.org/viewvc?rev=1764734&view=rev Log: Some additional pre-defined units of measurement. Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java?rev=1764734&r1=1764733&r2=1764734&view=diff ============================================================================== --- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java [UTF-8] (original) +++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java [UTF-8] Thu Oct 13 16:52:10 2016 @@ -62,8 +62,11 @@ public final class Units extends Static * @see #CENTIMETRE * @see #KILOMETRE * @see #NAUTICAL_MILE + * @see #MILE * @see #FOOT * @see #FOOT_SURVEY_US + * @see #INCH + * @see #PIXEL * * @since 0.8 */ @@ -121,12 +124,24 @@ public final class Units extends Static * * @see #METRE * @see #KILOMETRE + * @see #MILE * * @since 0.8 */ public static final Unit NAUTICAL_MILE = METRE.multiply(1852); /** + * Unit of measurement defined as 1609.344 metres. + * + * @see #METRE + * @see #KILOMETRE + * @see #NAUTICAL_MILE + * + * @since 0.8 + */ + public static final Unit MILE = METRE.multiply(1609.344); + + /** * Unit of measurement defined as 0.3048 metres. * * @see #METRE @@ -148,6 +163,21 @@ public final class Units extends Static public static final Unit FOOT_SURVEY_US = METRE.multiply(12 / 39.37); /** + * Unit of measurement defined as 2.54 centimetres. + * + * @since 0.8 + */ + public static final Unit INCH = METRE.multiply(2.54 / 100); + + /** + * Unit of measurement defined as 0.013837 inch. + * This is commonly used to measure the height of a font. + * + * @since 0.8 + */ + public static final Unit POINT = METRE.multiply(0.996264 / 72); + + /** * The SI unit for plane angles. * There is 2π radians in a circle. *