⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pubsubsubscribeopt.java

📁 一款即时通讯软件
💻 JAVA
字号:
package edu.ou.kmi.buddyspace.plugins.pubsub.xml;

/*
 * PubsubSubscribeOpt.java
 *
 * Project: BuddySpace
 * (C) Copyright Knowledge Media Institute 2003
 *
 *
 * Created on 10 October 2003, 9:25
 */

import java.util.*;
import org.jabber.jabberbeans.util.*;
import org.jabber.jabberbeans.*;
import org.jabber.jabberbeans.Extension.*;

/**
 * <code>PubsubPublish</code> contains &lt;subscribe-options&gt tag
 * from pubsub.
 *
 * @author  Jiri Komzak, Knowledge Media Institute, Open University, United Kingdom
 */
public class PubsubSubscribeOpt
    extends XMLData
{
    /** required */
    private boolean required;
    
    /**
     * Creates a new <code>PubsubSubscribeOpt</code> instance, based on the builder
     * state.
     *
     * @param builder an <code>PubsubSubscribeOptBuilder</code> value
     * @exception InstantiationException if malformed or insufficient data is
     * in the builder.
     */
    public PubsubSubscribeOpt(PubsubSubscribeOptBuilder builder)
        throws InstantiationException
    {
        required = builder.isRequired();
    }
    
    
    public boolean isRequired() {
        return required;
    }
    
    /**
     * <code>appendItem</code> appends the XML representation of the
     * current packet data to the specified <code>StringBuffer</code>.
     *
     * @param retval The <code>StringBuffer</code> to append to
     */
    public void appendItem(StringBuffer retval)
    {
	retval.append("<subscribe-options");
        
        if (required)
            retval.append("><required/></subscribe-options>");
        else
            retval.append("/>");
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -