srcanaapps/apiquerytool/com.nokia.s60tools.apiquery/src/com/nokia/s60tools/apiquery/shared/datatypes/APIDetailField.java
changeset 0 a02c979e8dfd
equal deleted inserted replaced
-1:000000000000 0:a02c979e8dfd
       
     1 /*
       
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17  
       
    18 package com.nokia.s60tools.apiquery.shared.datatypes;
       
    19 
       
    20 /**
       
    21  * Stores a single field of information
       
    22  * for API details.
       
    23  */
       
    24 public class APIDetailField {
       
    25 
       
    26 	public static final String VALUE_FIELD_SEPARATOR = ", "; //$NON-NLS-1$
       
    27 
       
    28 	/**
       
    29 	 * Description for the detail field.
       
    30 	 */
       
    31 	private final String description;
       
    32 	/**
       
    33 	 * Value for the detail field.
       
    34 	 */
       
    35 	private String value;
       
    36 
       
    37 	/**
       
    38 	 * Constructor.
       
    39 	 * @param description Description for the detail field.
       
    40 	 * @param value Value for the detail field.
       
    41 	 */
       
    42 	public APIDetailField(String description, String value){
       
    43 		this.description = description;
       
    44 		this.value = value;
       
    45 		
       
    46 	}
       
    47 
       
    48 	/**
       
    49 	 * Gets the description of the field.
       
    50 	 * @return the description
       
    51 	 */
       
    52 	public String getDescription() {
       
    53 		return description;
       
    54 	}
       
    55 
       
    56 	/**
       
    57 	 * Gets the value of the field.
       
    58 	 * @return the value
       
    59 	 */
       
    60 	public String getValue() {
       
    61 		return value;
       
    62 	}
       
    63 
       
    64 	/**
       
    65 	 * Appends new data to existing value string.
       
    66 	 * @param strToAppend String to be appended to existing value string.
       
    67 	 */
       
    68 	public void appendToExistingValue(String strToAppend) {
       
    69 		value = value + VALUE_FIELD_SEPARATOR + strToAppend;
       
    70 	}
       
    71 
       
    72 }