Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Logback: the reliable, generic, fast and flexible logging framework. Copyright (C) 1999-2011, QOS.ch. All rights reserved. This program and the accompanying materials are dual-licensed under either the terms of the Eclipse Public License v1.0 as published by the Eclipse Foundation or (per the licensee's choosing) under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation.
package ch.qos.logback.core.pattern.parser;
public class Node {
	static final int LITERAL = 0;
	static final int SIMPLE_KEYWORD = 1;
	static final int COMPOSITE_KEYWORD = 2;
	final int type;
	final Object value;
	Node(int type) {
		this(typenull);
	}
	Node(int typeObject value) {
		this. = type;
		this. = value;
	}

Returns:
Returns the type.
	public int getType() {
		return ;
	}

Returns:
Returns the value.
	public Object getValue() {
		return ;
	}
	public Node getNext() {
		return ;
	}
	public void setNext(Node next) {
		this. = next;
	}
	public boolean equals(Object o) {
		if (this == o) {
			return true;
		}
		if (!(o instanceof Node)) {
			return false;
		}
		Node r = (Nodeo;
		return ( == r.type)
				&& ( != null ? .equals(r.value) : r.value == null)
				&& ( != null ? .equals(r.next) : r.next == null);
	}
  public int hashCode() {
    int result = ;
    result = 31 * result + ( != null ? .hashCode() : 0);
    return result;
  }
		if ( != null) {
			return " -> " + ;
else {
			return "";
		}
	}
	public String toString() {
		StringBuffer buf = new StringBuffer();
		switch () {
		case :
			buf.append("LITERAL(" +  + ")");
			break;
		default:
			buf.append(super.toString());
		}
		return buf.toString();
	}
New to GrepCode? Check out our FAQ X