Package com.drew.lang

Examples of com.drew.lang.Rational.toSimpleString()


        if (!_directory.containsTag(NikonType2MakernoteDirectory.TAG_NIKON_TYPE2_DIGITAL_ZOOM)) return null;
        Rational rational = _directory.getRational(NikonType2MakernoteDirectory.TAG_NIKON_TYPE2_DIGITAL_ZOOM);
        if (rational.intValue() == 1) {
            return "No digital zoom";
        }
        return rational.toSimpleString(true) + "x digital zoom";
    }

    public String getIsoSettingDescription() throws MetadataException
    {
        if (!_directory.containsTag(NikonType2MakernoteDirectory.TAG_NIKON_TYPE2_ISO_1)) return null;
View Full Code Here


    public String getFlashStrengthDescription() throws MetadataException
    {
        if (!_directory.containsTag(FujifilmMakernoteDirectory.TAG_FUJIFILM_FLASH_STRENGTH)) return null;
        Rational value = _directory.getRational(FujifilmMakernoteDirectory.TAG_FUJIFILM_FLASH_STRENGTH);
        return value.toSimpleString(false) + " EV (Apex)";
    }

    public String getFlashModeDescription() throws MetadataException
    {
        if (!_directory.containsTag(FujifilmMakernoteDirectory.TAG_FUJIFILM_FLASH_MODE)) return null;
View Full Code Here

    public void testToSimpleString() throws Exception
    {
        Rational third1 = new Rational(1, 3);
        Rational third2 = new Rational(2, 6);
        assertEquals("1/3", third1.toSimpleString(true));
        assertEquals("1/3", third2.toSimpleString(true));
        assertEquals(third1, third2);

        Rational twoThirds = new Rational(10, 15);
        assertEquals("2/3", twoThirds.toSimpleString(true));
View Full Code Here

        assertEquals("1/3", third1.toSimpleString(true));
        assertEquals("1/3", third2.toSimpleString(true));
        assertEquals(third1, third2);

        Rational twoThirds = new Rational(10, 15);
        assertEquals("2/3", twoThirds.toSimpleString(true));

        Rational two = new Rational(10, 5);
        assertTrue(two.isInteger());
        assertEquals("2", two.toSimpleString(true));
        assertEquals("2", two.toSimpleString(false));
View Full Code Here

        Rational twoThirds = new Rational(10, 15);
        assertEquals("2/3", twoThirds.toSimpleString(true));

        Rational two = new Rational(10, 5);
        assertTrue(two.isInteger());
        assertEquals("2", two.toSimpleString(true));
        assertEquals("2", two.toSimpleString(false));

        Rational twoFifths = new Rational(4, 10);
        assertEquals("0.4", twoFifths.toSimpleString(true));
        assertEquals("2/5", twoFifths.toSimpleString(false));
View Full Code Here

        assertEquals("2/3", twoThirds.toSimpleString(true));

        Rational two = new Rational(10, 5);
        assertTrue(two.isInteger());
        assertEquals("2", two.toSimpleString(true));
        assertEquals("2", two.toSimpleString(false));

        Rational twoFifths = new Rational(4, 10);
        assertEquals("0.4", twoFifths.toSimpleString(true));
        assertEquals("2/5", twoFifths.toSimpleString(false));
View Full Code Here

        assertTrue(two.isInteger());
        assertEquals("2", two.toSimpleString(true));
        assertEquals("2", two.toSimpleString(false));

        Rational twoFifths = new Rational(4, 10);
        assertEquals("0.4", twoFifths.toSimpleString(true));
        assertEquals("2/5", twoFifths.toSimpleString(false));

        Rational threeEigths = new Rational(3, 8);
        assertEquals("3/8", threeEigths.toSimpleString(true));
View Full Code Here

        assertEquals("2", two.toSimpleString(true));
        assertEquals("2", two.toSimpleString(false));

        Rational twoFifths = new Rational(4, 10);
        assertEquals("0.4", twoFifths.toSimpleString(true));
        assertEquals("2/5", twoFifths.toSimpleString(false));

        Rational threeEigths = new Rational(3, 8);
        assertEquals("3/8", threeEigths.toSimpleString(true));

        Rational zero = new Rational(0, 8);
View Full Code Here

        Rational twoFifths = new Rational(4, 10);
        assertEquals("0.4", twoFifths.toSimpleString(true));
        assertEquals("2/5", twoFifths.toSimpleString(false));

        Rational threeEigths = new Rational(3, 8);
        assertEquals("3/8", threeEigths.toSimpleString(true));

        Rational zero = new Rational(0, 8);
        assertTrue(zero.isInteger());
        assertEquals("0", zero.toSimpleString(true));
        assertEquals("0", zero.toSimpleString(false));
View Full Code Here

        Rational threeEigths = new Rational(3, 8);
        assertEquals("3/8", threeEigths.toSimpleString(true));

        Rational zero = new Rational(0, 8);
        assertTrue(zero.isInteger());
        assertEquals("0", zero.toSimpleString(true));
        assertEquals("0", zero.toSimpleString(false));

        zero = new Rational(0, 0);
        assertTrue(zero.isInteger());
        assertEquals("0", zero.toSimpleString(true));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.