Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  
  package com.example.stock.async;
  
  import java.util.List;

Java class for StockOffer complex type.

The following schema fragment specifies the expected content contained within this class.

 <complexType name="StockOffer">
   <complexContent>
     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
       <sequence>
         <element name="symbol" type="{http://www.w3.org/2001/XMLSchema}string"/>
         <element name="price" type="{http://www.w3.org/2001/XMLSchema}float"/>
         <element name="name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
         <element name="list" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
       </sequence>
     </restriction>
   </complexContent>
 </complexType>
 
 
 @XmlType(name = "StockOffer", propOrder = {
     "symbol",
     "price",
     "name",
     "list"
 })
 public class StockOffer {
 
     @XmlElement(required = true)
     protected String symbol;
     @XmlElement(required = true, type = Float.class, nillable = true)
     protected Float price;
     protected String name;
     protected List<Stringlist;

    
Gets the value of the symbol property.

Returns:
possible object is
 
     public String getSymbol() {
         return ;
     }

    
Sets the value of the symbol property.

Parameters:
value allowed object is
 
     public void setSymbol(String value) {
         this. = value;
     }

    
Gets the value of the price property.

Returns:
possible object is
 
     public Float getPrice() {
         return ;
     }

    
Sets the value of the price property.

Parameters:
value allowed object is
 
     public void setPrice(Float value) {
         this. = value;
     }

    
Gets the value of the name property.

Returns:
possible object is
    public String getName() {
        return ;
    }

    
Sets the value of the name property.

Parameters:
value allowed object is
    public void setName(String value) {
        this. = value;
    }

    
Gets the value of the list property.

This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a set method for the list property.

For example, to add a new item, do as follows:

    getList().add(newItem);
 

Objects of the following type(s) are allowed in the list

    public List<StringgetList() {
        if ( == null) {
             = new ArrayList<String>();
        }
        return this.;
    }
New to GrepCode? Check out our FAQ X