Package java.util.regex

Examples of java.util.regex.Matcher.replaceFirst()


                 units = "hhmm";
            }

            field.put("Wind_Shift", time);
            unit.put("Wind_Shift", units);
            remark = m.replaceFirst(" ");
        }

        //   get FROPO ( wind shift because of frontal passage )
        //  $Wshft_FROPA = 1 if( s#FROPA\s+## ) ;
        m = MP.FROPA.matcher(remark);
View Full Code Here


        //  $Wshft_FROPA = 1 if( s#FROPA\s+## ) ;
        m = MP.FROPA.matcher(remark);
        if (m.find()) {
            field.put("Wind_Shift_Frontal_Passage", "Yes");
            unit.put("Wind_Shift_Frontal_Passage", "");
            remark = m.replaceFirst(" ");
        }

        //   Tower visibility
        //  if( s#TWR (VIS|VSBY) (\d1,3) (\d1,2)/(\d1,2)\s+## )
        //  $VIS_TWR = $2 + ( $3 / $4 ) ;
View Full Code Here

            var2 = Float.parseFloat(m.group(3));
            var3 = Float.parseFloat(m.group(4));
            var1 = var1 + (var2 / var3);
            field.put("Tower_Visibility", Float.toString(var1));
            unit.put("Tower_Visibility", "miles");
            remark = m.replaceFirst(" ");
            //   elsif( s#TWR (VIS|VSBY) (\d1,2)/(\d1,2)\s+## )
            //    $VIS_TWR = ( $2 / $3 ) ;
        } else {
            m = MP.towerVisibility2.matcher(remark);
            if (m.find()) {
View Full Code Here

                var1 = Float.parseFloat(m.group(2));
                var2 = Float.parseFloat(m.group(3));
                var1 = var1 / var2;
                field.put("Tower_Visibility", Float.toString(var1));
                unit.put("Tower_Visibility", "miles");
                remark = m.replaceFirst(" ");
                //     elsif( s#TWR (VIS|VSBY) (\d1,3)\s+## )
                //      $VIS_TWR = $2 ;
            } else {
                m = MP.towerVisibility3.matcher(remark);
                if (m.find()) {
View Full Code Here

            } else {
                m = MP.towerVisibility3.matcher(remark);
                if (m.find()) {
                    field.put("Tower_Visibility", m.group(2));
                    unit.put("Tower_Visibility", "miles");
                    remark = m.replaceFirst(" ");
                }
            }
        }
       
        // Surface visibility
View Full Code Here

            var2 = Float.parseFloat(m.group(3));
            var3 = Float.parseFloat(m.group(4));
            var1 = var1 + (var2 / var3);
            field.put("Surface_Visibility", Float.toString(var1));
            unit.put("Surface_Visibility", "miles");
            remark = m.replaceFirst(" ");
            //     elsif( s# SFC (VIS|VSBY) (\d1,2)/(\d1,2)\s+## )
            //      $VIS_SFC = ( $2 / $3 ) ;
        } else {
            m = MP.surfaceVisibility2.matcher(remark);
            if (m.find()) {
View Full Code Here

                var1 = Float.parseFloat(m.group(2));
                var2 = Float.parseFloat(m.group(3));
                var1 = var1 / var2;
                field.put("Surface_Visibility", Float.toString(var1));
                unit.put("Surface_Visibility", "miles");
                remark = m.replaceFirst(" ");
                //  elsif( s# SFC (VIS|VSBY) (\d1,3)\s+## )
                // $VIS_SFC = $2 ;
            } else {
                m = MP.surfaceVisibility3.matcher(remark);
                if (m.find()) {
View Full Code Here

            } else {
                m = MP.surfaceVisibility3.matcher(remark);
                if (m.find()) {
                    field.put("Surface_Visibility", m.group(2));
                    unit.put("Surface_Visibility", "miles");
                    remark = m.replaceFirst(" ");
                }
            }
        }

        //   Variable visibility
View Full Code Here

            var2 = Float.parseFloat(m.group(6));
            var3 = Float.parseFloat(m.group(7));
            var1 = var1 + (var2 / var3);
            field.put("Variable_Visibility_Max", Float.toString(var1));
            unit.put("Variable_Visibility_Max", "miles");
            remark = m.replaceFirst(" ");
            //   elsif( s#(VIS|VSBY) (\d1,3)V(\d1,3) (\d1,2)/(\d1,2)\s+## )
            //    $VISmin = $2 ;
            //    $VISmax = $3 + ( $4 / $5 ) ;
        } else {
            m = MP.variableVisibility2.matcher(remark);
View Full Code Here

                var2 = Float.parseFloat(m.group(4));
                var3 = Float.parseFloat(m.group(5));
                var1 = var1 + (var2 / var3);
                field.put("Variable_Visibility_Max", Float.toString(var1));
                unit.put("Variable_Visibility_Max", "miles");
                remark = m.replaceFirst(" ");
                //  elsif( s#(VIS|VSBY) (\d1,2)/(\d1,2)V(\d1,3) (\d1,2)/(\d1,2)\s+## )
                //      $VISmin = ( $2 / $3 ) ;
                //      $VISmax = $4 + ( $5 / $6 ) ;
            } else {
                m = MP.variableVisibility3.matcher(remark);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.