Codota Logo
MutableIntegerConverter.convert
Code IndexAdd Codota to your IDE (free)

How to use
convert
method
in
jodd.typeconverter.impl.MutableIntegerConverter

Best Java code snippets using jodd.typeconverter.impl.MutableIntegerConverter.convert (Showing top 1 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: oblac/jodd

  @Test
  void testConversion() {
    MutableIntegerConverter mutableIntegerConverter = (MutableIntegerConverter) TypeConverterManager.get().lookup(MutableInteger.class);

    assertNull(mutableIntegerConverter.convert(null));

    assertEquals(new MutableInteger(1), mutableIntegerConverter.convert(new MutableInteger(1)));
    assertEquals(new MutableInteger(1), mutableIntegerConverter.convert(Integer.valueOf(1)));
    assertEquals(new MutableInteger(1), mutableIntegerConverter.convert(Short.valueOf((short) 1)));
    assertEquals(new MutableInteger(1), mutableIntegerConverter.convert(Double.valueOf(1.0D)));
    assertEquals(new MutableInteger(1), mutableIntegerConverter.convert("1"));
    assertEquals(new MutableInteger(1), mutableIntegerConverter.convert(" 1 "));

    try {
      mutableIntegerConverter.convert("a");
      fail("error");
    } catch (TypeConversionException ignore) {
    }
  }
}
jodd.typeconverter.implMutableIntegerConverterconvert

Popular methods of MutableIntegerConverter

  • <init>

Popular in Java

  • Making http requests using okhttp
  • getResourceAsStream (ClassLoader)
  • onRequestPermissionsResult (Fragment)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • JLabel (javax.swing)
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Option (scala)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now