source: code/Website/open-flash-chart/com/adobe/serialization/json/JSONToken.as@ 7849

Last change on this file since 7849 was 7849, checked in by dennisw, 15 years ago
File size: 3.3 KB
Line 
1/*
2Adobe Systems Incorporated(r) Source Code License Agreement
3Copyright(c) 2005 Adobe Systems Incorporated. All rights reserved.
4
5Please read this Source Code License Agreement carefully before using
6the source code.
7
8Adobe Systems Incorporated grants to you a perpetual, worldwide, non-exclusive,
9no-charge, royalty-free, irrevocable copyright license, to reproduce,
10prepare derivative works of, publicly display, publicly perform, and
11distribute this source code and such derivative works in source or
12object code form without any attribution requirements.
13
14The name "Adobe Systems Incorporated" must not be used to endorse or promote products
15derived from the source code without prior written permission.
16
17You agree to indemnify, hold harmless and defend Adobe Systems Incorporated from and
18against any loss, damage, claims or lawsuits, including attorney's
19fees that arise or result from your use or distribution of the source
20code.
21
22THIS SOURCE CODE IS PROVIDED "AS IS" AND "WITH ALL FAULTS", WITHOUT
23ANY TECHNICAL SUPPORT OR ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
24BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ALSO, THERE IS NO WARRANTY OF
26NON-INFRINGEMENT, TITLE OR QUIET ENJOYMENT. IN NO EVENT SHALL MACROMEDIA
27OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
28EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
29PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
30OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
31WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
32OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOURCE CODE, EVEN IF
33ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34*/
35
36package com.adobe.serialization.json {
37
38 public class JSONToken {
39
40 private var _type:int;
41 private var _value:Object;
42
43 /**
44 * Creates a new JSONToken with a specific token type and value.
45 *
46 * @param type The JSONTokenType of the token
47 * @param value The value of the token
48 * @langversion ActionScript 3.0
49 * @playerversion Flash 9.0
50 * @tiptext
51 */
52 public function JSONToken( type:int = -1 /* JSONTokenType.UNKNOWN */, value:Object = null ) {
53 _type = type;
54 _value = value;
55 }
56
57 /**
58 * Returns the type of the token.
59 *
60 * @see com.adobe.serialization.json.JSONTokenType
61 * @langversion ActionScript 3.0
62 * @playerversion Flash 9.0
63 * @tiptext
64 */
65 public function get type():int {
66 return _type;
67 }
68
69 /**
70 * Sets the type of the token.
71 *
72 * @see com.adobe.serialization.json.JSONTokenType
73 * @langversion ActionScript 3.0
74 * @playerversion Flash 9.0
75 * @tiptext
76 */
77 public function set type( value:int ):void {
78 _type = value;
79 }
80
81 /**
82 * Gets the value of the token
83 *
84 * @see com.adobe.serialization.json.JSONTokenType
85 * @langversion ActionScript 3.0
86 * @playerversion Flash 9.0
87 * @tiptext
88 */
89 public function get value():Object {
90 return _value;
91 }
92
93 /**
94 * Sets the value of the token
95 *
96 * @see com.adobe.serialization.json.JSONTokenType
97 * @langversion ActionScript 3.0
98 * @playerversion Flash 9.0
99 * @tiptext
100 */
101 public function set value ( v:Object ):void {
102 _value = v;
103 }
104
105 }
106
107}
Note: See TracBrowser for help on using the repository browser.