Examples of toSimpleString()


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

        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

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

        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

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

        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

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

        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

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

        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

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

        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));
        assertEquals("0", zero.toSimpleString(false));
View Full Code Here

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

        assertEquals("0", zero.toSimpleString(true));
        assertEquals("0", zero.toSimpleString(false));

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

        // not sure this is a nice presentation of rationals.  won't implement it for now.
//        Rational twoAndAHalf = new Rational(10,4);
//        assertEquals("2 1/2", twoAndAHalf.toSimpleString());
View Full Code Here

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

        assertEquals("0", zero.toSimpleString(false));

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

        // not sure this is a nice presentation of rationals.  won't implement it for now.
//        Rational twoAndAHalf = new Rational(10,4);
//        assertEquals("2 1/2", twoAndAHalf.toSimpleString());
    }
View Full Code Here

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

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

    public String getExposureBiasDescription()
    {
        Rational value = _directory.getRational(ExifSubIFDDirectory.TAG_EXPOSURE_BIAS);
        if (value==null)
            return null;
        return value.toSimpleString(true) + " EV";
    }

    @Nullable
    public String getMaxApertureValueDescription()
    {
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.