1 6 7 package com.hp.hpl.jena.graph; 8 9 import com.hp.hpl.jena.graph.impl.*; 10 import com.hp.hpl.jena.shared.*; 11 12 16 public class Node_Literal extends Node_Concrete 17 { 18 Node_Literal( Object label ) 19 { super( label ); } 20 21 public LiteralLabel getLiteral() 22 { return (LiteralLabel) label; } 23 24 public String toString( PrefixMapping pm, boolean quoting ) 25 { return ((LiteralLabel) label).toString( quoting ); } 26 27 public boolean isLiteral() 28 { return true; } 29 30 public Object visitWith( NodeVisitor v ) 31 { return v.visitLiteral( this, getLiteral() ); } 32 33 public boolean equals( Object other ) 34 { return other instanceof Node_Literal && label.equals( ((Node_Literal) other).label ); } 35 36 46 public boolean sameValueAs(Object o) { 47 return o instanceof Node_Literal 48 && ((LiteralLabel)label).sameValueAs( ((Node_Literal) o).getLiteral() ); 49 } 50 51 public boolean matches( Node x ) 52 { return sameValueAs( x ); } 53 54 } 55 56 85 | Popular Tags |