Java Integer Create toInterval(long i)

Here you can find the source of toInterval(long i)

Description

to Interval

License

Apache License

Declaration

static public final String toInterval(long i) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    static public final String toInterval(long i) {
        if (i < 60)
            return i + "S";

        if (i < 3600)
            return (i / 60) + "M";

        return (i / 3600) + "H";
    }/*from  w  ww . java  2s  . c  o m*/
}

Related

  1. toInternalName(String fullName)
  2. toInternalString(String s)
  3. toInternalValue(final double value)
  4. toInternalVariableName(String varName)
  5. toInternLink(String title, String url)
  6. toIntExact(long value)
  7. toIntExp(String charExp)
  8. toIntFormat(String value)
  9. toIntHeader(String value)