📄 iqdiscoinfobuilder.java
字号:
/*
* License
*
* The contents of this file are subject to the Jabber Open Source License
* Version 1.0 (the "License"). You may not copy or use this file, in either
* source code or executable form, except in compliance with the License. You
* may obtain a copy of the License at http://www.jabber.com/license/ or at
* http://www.opensource.org/.
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* Copyrights
*
* Portions created by or assigned to Jabber.com, Inc. are
* Copyright (c) 2000 Jabber.com, Inc. All Rights Reserved. Contact
* information for Jabber.com, Inc. is available at http://www.jabber.com/.
*
* Portions Copyright (c) 1999-2000 David Waite
*
* Acknowledgements
*
* Special thanks to the Jabber Open Source Contributors for their
* suggestions and support of Jabber.
*
* Changes
*
* @author David Waite <a href="mailto:dwaite@jabber.com">
* <i><dwaite@jabber.com></i></a>
*
* @author $Author: chris $
* @version $Revision: 1.1 $
*
* j.komzak
* Changed into IQDiscoInfoBuilder
*/
package edu.ou.kmi.buddyspace.plugins.disco.xml;
/*
* IQDiscoInfoBuilder.java
*
* Project: BuddySpace
* (C) Copyright Knowledge Media Institute 2003
*
*
* Created on 20 August 2003, 8:37
*/
import java.util.Vector;
import org.jabber.jabberbeans.Extension.*;
/**
* <code>IQDiscoInfoBuilder</code> is used to construct IQDiscoInfo objects
*
* @author Jiri Komzak, Knowledge Media Institute, Open University, United Kingdom
*/
public class IQDiscoInfoBuilder
implements ExtensionBuilder
{
/** Vector of identity objects contained. */
private Vector identities;
/** Vector of feature objects contained. */
private Vector features;
private String node = null;
/** Creates a new <code>IQDiscoInfoBuilder</code> instance. */
public IQDiscoInfoBuilder()
{ reset(); }
/**
* <code>reset</code> the builder to a default state, so it can be reused.
*/
public void reset() {
identities = new Vector();
features = new Vector();
node = null;
}
public void setNode(String newNode) {
node = newNode;
}
public String getNode() {
return node;
}
/**
* <code>addIdentity</code> adds a new idebtity object to the end of this
* list.
*
* @param item an <code>DiscoIdentity</code> value
*/
public void addIdentity(DiscoIdentity identity)
{
if (!identities.contains(identity))
identities.addElement(identity);
}
/**
* <code>getIdentities</code> returns the vector representing the identity
* objects associated with this object.
*
* @return a <code>Vector</code> value
*/
public Vector getIdentities()
{ return identities; }
/**
* <code>addFeature</code> adds a new idebtity object to the end of this
* list.
*
* @param item an <code>DiscoFeature</code> value
*/
public void addFeature(DiscoFeature feature)
{
if (!features.contains(feature))
features.addElement(feature);
}
/**
* <code>getFeatures</code> returns the vector representing the feature
* objects associated with this object.
*
* @return a <code>Vector</code> value
*/
public Vector getFeatures()
{ return features; }
/**
* <code>build</code> a new IQDiscoInfo object
*
* @return an <code>Extension</code> value
* @exception InstantiationException if insufficient or incorrect data
* was proviced.
*/
public Extension build()
throws InstantiationException
{ return new IQDiscoInfo(this); }
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -