Package eu.simuline.util
Interface RealRepresentation.Cutter
-
- Enclosing class:
- RealRepresentation
public static interface RealRepresentation.CutterACutteris used to shorten numbers. This can either be done by cutting, by rounding or somenthing else.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Stringcut(String str, int len)Returns a substring ofstrwith lengthlenor throws an exception.
-
-
-
Method Detail
-
cut
String cut(String str, int len)
Returns a substring ofstrwith lengthlenor throws an exception.- Parameters:
str- aStringwithstr.length() >= len.len- the desired length of the resulting string.- Returns:
- a substring of
strwith lengthlen. - Throws:
RuntimeException- by need if the cut is not allowed.
-
-