Java String Length Get lengthToString(double value, boolean proportional)

Here you can find the source of lengthToString(double value, boolean proportional)

Description

length To String

License

Open Source License

Declaration

public static String lengthToString(double value, boolean proportional) 

Method Source Code

//package com.java2s;
/*//from   w  w  w  . j  av  a  2 s . c o m
 * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
 * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 */

public class Main {
    public static String lengthToString(double value, boolean proportional) {
        if (proportional) {
            return (value * 100) + "%";
        } else {
            return value + "px";
        }
    }
}

Related

  1. lengthMinusTrailingWhitespace(String line)
  2. lengthOfCommonPrefix(String s1, String s2)
  3. lengthOfStartingWhitespace(String s)
  4. lengthOfString(final String cadena)
  5. lengthTokensField(String fieldName)
  6. lengthUCP(String s)
  7. lengthUnicode(String s)
  8. lengthWithinLimits(String string, int min, int max)