Code example for Scanner

Methods: nextFloat

0
        resetMaterial(); 
    } 
 
    protected ColorRGBA readColor(){ 
        ColorRGBA v = new ColorRGBA();
        v.set(scan.nextFloat(), scan.nextFloat(), scan.nextFloat(), 1.0f);
        return v;
    } 
 
    protected String nextStatement(){
        scan.useDelimiter("\n");
        String result = scan.next();
        scan.useDelimiter("\\p{javaWhitespace}+");
        return result;
    } 
     
    protected boolean skipLine(){ 
        try { 
            scan.skip(".*\r{0,1}\n");
            return true; 
        } catch (NoSuchElementException ex){