01: /* Generated by Together */
02:
03: package com.rimfaxe.xml.xmlreader.xpath;
04:
05: /** A '..' node test.
06: * This is part of the GoF Flyweight(195) pattern -- Only one object of
07: * this class ever exists, shared amongst all clients.
08: * You use INSTANCE instead of the constructor to get
09: * that object.
10:
11: <blockquote><small> Copyright (C) 2002 Hewlett-Packard Company.
12: This file is part of Sparta, an XML Parser, DOM, and XPath library.
13: This library is free software; you can redistribute it and/or
14: modify it under the terms of the <a href="doc-files/LGPL.txt">GNU
15: Lesser General Public License</a> as published by the Free Software
16: Foundation; either version 2.1 of the License, or (at your option)
17: any later version. This library is distributed in the hope that it
18: will be useful, but WITHOUT ANY WARRANTY; without even the implied
19: warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
20: PURPOSE. </small></blockquote>
21: @version $Date: 2002/12/06 23:38:05 $ $Revision: 1.2 $
22: @author Eamonn O'Brien-Strain
23: */
24: public class ParentNodeTest extends NodeTest {
25:
26: //only need one of them => GoF Flyweight Pattern(195)
27: private ParentNodeTest() {
28: }
29:
30: static final ParentNodeTest INSTANCE = new ParentNodeTest();
31:
32: public void accept(Visitor visitor) throws XPathException {
33: visitor.visit(this );
34: }
35:
36: /** Return false*/
37: public boolean isStringValue() {
38: return false;
39: }
40:
41: public String toString() {
42: return "..";
43: }
44:
45: }
46:
47: // $Log: ParentNodeTest.java,v $
48: // Revision 1.2 2002/12/06 23:38:05 eobrain
49: // Make objects that are always the same follow the Flyweight Pattern.
50: //
51: // Revision 1.1.1.1 2002/08/19 05:04:04 eobrain
52: // import from HP Labs internal CVS
53: //
54: // Revision 1.3 2002/08/18 23:38:54 eob
55: // Add copyright and other formatting and commenting in preparation for
56: // release to SourceForge.
57: //
58: // Revision 1.2 2002/06/14 19:40:47 eob
59: // Make test for isStringValue more object-oriented. Avoid "instanceof".
60: //
61: // Revision 1.1 2002/02/01 02:06:17 eob
62: // initial
|