How to get one sensor value from the arduino into processing?


In the graph tutorial on the arduino website under "communications" where I interface processing with arduino, I get the data from the arduino with the below line of code:

MyPort = new Serial(this, Serial.list()[1], 9600);

If I send one sensor signal from the arduino to processing, how do I extract that one sensor value and make it a variable that I can put into an if statement?

Thanks, Ana