|  |  |  | 
|---|
|  |  |  | package com.doumee.ticketmachine; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.doumee.keyCabinet.MApplication; | 
|---|
|  |  |  | import com.doumee.keyCabinet.utils.CircularQueue; | 
|---|
|  |  |  | import com.doumee.keyCabinet.utils.i485.SportUtils; | 
|---|
|  |  |  | import com.example.datalibrary.utils.ToastUtils; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import org.junit.Test; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | public class ExampleUnitTest { | 
|---|
|  |  |  | @Test | 
|---|
|  |  |  | public void addition_isCorrect() { | 
|---|
|  |  |  | String s = "Result:12.00mg/100ml"; | 
|---|
|  |  |  | Pattern pattern = Pattern.compile("([0-9]+\\.[0-9]+)"); | 
|---|
|  |  |  | Matcher matcher = pattern.matcher(s); | 
|---|
|  |  |  | if (matcher.find()) { | 
|---|
|  |  |  | System.out.println(matcher.group(1)); // 输出: 12.00 | 
|---|
|  |  |  | CircularQueue queue = new CircularQueue(); | 
|---|
|  |  |  | for(int i=0;i<3;i++){ | 
|---|
|  |  |  | queue.enqueue(i+""); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | System.out.println(queue.dequeue()); | 
|---|
|  |  |  | System.out.println(queue.dequeue()); | 
|---|
|  |  |  | System.out.println(queue.dequeue()); | 
|---|
|  |  |  | System.out.println(queue.dequeue()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|