themeinstaller/source/src/com/nokia/tools/themeinstaller/cssparser/CSSPropertyValue.java
branchRCL_3
changeset 17 fe49e33862e2
parent 16 b685c59de105
child 18 04b7640f6fb5
equal deleted inserted replaced
16:b685c59de105 17:fe49e33862e2
     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:  CSS Style property value
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 package com.nokia.tools.themeinstaller.cssparser;
       
    20 
       
    21 /**
       
    22  * Contains property's value and value type
       
    23  */
       
    24 public class CSSPropertyValue
       
    25     {
       
    26 
       
    27     /** The Constant STRING_SEPARATOR. */
       
    28     private static final String STRING_SEPARATOR = "|";
       
    29 
       
    30     /** The value as string. */
       
    31     private String iValue;
       
    32 
       
    33     /** The value type. */
       
    34     private short iValueType;
       
    35 
       
    36     /**
       
    37      * Instantiates a new CSS property value.
       
    38      *
       
    39      * @param aValue the a value
       
    40      * @param aValueType the a value type
       
    41      */
       
    42     public CSSPropertyValue( short aValueType, String aValue )
       
    43         {
       
    44         iValue = aValue;
       
    45         iValueType = aValueType;
       
    46         }
       
    47 
       
    48     /**
       
    49      * Gets the value.
       
    50      *
       
    51      * @return the value
       
    52      */
       
    53     public String getValue()
       
    54         {
       
    55         return iValue;
       
    56         }
       
    57 
       
    58     /**
       
    59      * Gets the value type.
       
    60      *
       
    61      * @return the value type
       
    62      */
       
    63     public short getValueType()
       
    64         {
       
    65         return iValueType;
       
    66         }
       
    67 
       
    68     /**
       
    69      * Gets the value type as string.
       
    70      *
       
    71      * @return the value type as string
       
    72      */
       
    73     public String getValueTypeAsString()
       
    74         {
       
    75         return String.valueOf( iValueType );
       
    76         }
       
    77 
       
    78     /**
       
    79      * Gets the value type and value.
       
    80      *
       
    81      * @return the value type and value
       
    82      */
       
    83     public String getValueTypeAndValue()
       
    84         {
       
    85         return iValueType + STRING_SEPARATOR + iValue;
       
    86         }
       
    87 
       
    88     }