com.hp.hpl.sparta.xpath.ThisNodeTest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pinyin4j Show documentation
Show all versions of pinyin4j Show documentation
Support Chinese character (both Simplified and Tranditional) to most popular Pinyin systems, including
Hanyu Pinyin, Tongyong Pinyin, Wade-Giles, MPS2, Yale and Gwoyeu Romatzyh. Support multiple pronounciations and
customized output.
The newest version!
/* Generated by Together */
package com.hp.hpl.sparta.xpath;
/** A '.' node test.
* This is part of the GoF Flyweight(195) pattern -- Only one object of
* this class ever exists, shared amongst all clients.
* You use INSTANCE instead of the constructor to get
* that object.
Copyright (C) 2002 Hewlett-Packard Company.
This file is part of Sparta, an XML Parser, DOM, and XPath library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU
Lesser General Public License as published by the Free Software
Foundation; either version 2.1 of the License, or (at your option)
any later version. This library is distributed in the hope that it
will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
@version $Date: 2002/12/06 23:41:18 $ $Revision: 1.2 $
@author Eamonn O'Brien-Strain
*/
public class ThisNodeTest extends NodeTest {
//only need one of them => GoF Flyweight Pattern(195)
private ThisNodeTest() {}
static final ThisNodeTest INSTANCE = new ThisNodeTest();
public void accept(Visitor visitor) {
visitor.visit(this);
}
/** Return false*/
public boolean isStringValue() {
return false;
}
public String toString() {
return ".";
}
}
// $Log: ThisNodeTest.java,v $
// Revision 1.2 2002/12/06 23:41:18 eobrain
// Make objects that are always the same follow the Flyweight Pattern.
//
// Revision 1.1.1.1 2002/08/19 05:04:03 eobrain
// import from HP Labs internal CVS
//
// Revision 1.3 2002/08/18 23:39:10 eob
// Add copyright and other formatting and commenting in preparation for
// release to SourceForge.
//
// Revision 1.2 2002/06/14 19:41:56 eob
// Make test for isStringValue more object-oriented. Avoid "instanceof".
//
// Revision 1.1 2002/02/01 02:50:18 eob
// initial