All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.sylinx.hbatis.ext.ifblock.ELSIF Maven / Gradle / Ivy

There is a newer version: 2.0.0.RELEASE
Show newest version
package cn.sylinx.hbatis.ext.ifblock;

import java.util.ArrayList;
import java.util.List;

public class ELSIF implements FollowNode, PreNode {

	private int index;
	
	private int nextIndex;
	
	private String condition;

	private List ifEndBlockList = new ArrayList();

	private String contentPattern;

	/**
	 * ELSIF or ELSE
	 */
	private FollowNode followNode;

	/**
	 * IF or ELSIF
	 */
	private PreNode preNode;

	public String getNodeName() {
		return "#ELSIF";
	}
	
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append("{");
		sb.append("ELSIF NODE(");
		sb.append("index:").append(index).append(",");
		sb.append("nextIndex:").append(nextIndex).append(",");
		sb.append("condition:").append(condition).append(",");
		sb.append("contentPattern:").append(contentPattern).append(",");
		sb.append("followNode:").append(followNode).append(",");
		sb.append("ifEndBlockList:").append("[");
		for (IfEndBlock item : ifEndBlockList) {
			sb.append(item.toString()).append(",");
		}
		sb.append("]");
		sb.append(")");
		sb.append("}");

		return sb.toString();
	}
	
	public int getNextIndex() {
		return nextIndex;
	}

	public void setNextIndex(int nextIndex) {
		this.nextIndex = nextIndex;
	}

	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}

	public void addIfEndBlock(IfEndBlock ifEndBlock) {
		ifEndBlockList.add(ifEndBlock);
	}

	public String getCondition() {
		return condition;
	}

	public void setCondition(String condition) {
		this.condition = condition;
	}

	public String getContentPattern() {
		return contentPattern;
	}

	public void setContentPattern(String contentPattern) {
		this.contentPattern = contentPattern;
	}

	public FollowNode getFollowNode() {
		return followNode;
	}

	public void setFollowNode(FollowNode followNode) {
		this.followNode = followNode;
	}

	public PreNode getPreNode() {
		return preNode;
	}

	public void setPreNode(PreNode preNode) {
		this.preNode = preNode;
	}

	public List getIfEndBlockList() {
		return ifEndBlockList;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy