Code example for Stack

Methods: firstElement

0
     *  
     * @return the geocode response 
     */ 
    public GeocodeResponse getGeocodeResponse() { 
        GeocodeResponse geocodeResponse = null;
        if (objStack.firstElement() != null) {
            if (objStack.firstElement().getClass() == new GeocodeResponse()
                    .getClass()) { 
                geocodeResponse = (GeocodeResponse) objStack.firstElement();
            } 
        } 
        return geocodeResponse;
    } 
 
}