KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > poi > hdf > extractor > util > PropertyNode


1
2 /* ====================================================================
3    Copyright 2002-2004 Apache Software Foundation
4
5    Licensed under the Apache License, Version 2.0 (the "License");
6    you may not use this file except in compliance with the License.
7    You may obtain a copy of the License at
8
9        http://www.apache.org/licenses/LICENSE-2.0
10
11    Unless required by applicable law or agreed to in writing, software
12    distributed under the License is distributed on an "AS IS" BASIS,
13    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14    See the License for the specific language governing permissions and
15    limitations under the License.
16 ==================================================================== */

17         
18
19
20 package org.apache.poi.hdf.extractor.util;
21
22 /**
23  * Comment me
24  *
25  * @author Ryan Ackley
26  */

27
28 public class PropertyNode implements Comparable JavaDoc
29 {
30   private byte[] _grpprl;
31   private int _fcStart;
32   private int _fcEnd;
33
34   public PropertyNode(int fcStart, int fcEnd, byte[] grpprl)
35   {
36       _fcStart = fcStart;
37       _fcEnd = fcEnd;
38       _grpprl = grpprl;
39   }
40   public int getStart()
41   {
42       return _fcStart;
43   }
44   public int getEnd()
45   {
46     return _fcEnd;
47   }
48   protected byte[] getGrpprl()
49   {
50     return _grpprl;
51   }
52   public int compareTo(Object JavaDoc o)
53   {
54       int fcStart = ((PropertyNode)o).getStart();
55       if(_fcStart == fcStart)
56       {
57         return 0;
58       }
59       else if(_fcStart < fcStart)
60       {
61         return -1;
62       }
63       else
64       {
65         return 1;
66       }
67   }
68 }
69
Popular Tags