本文整理汇总了Java中com.sun.xml.internal.stream.util.ReadOnlyIterator类的典型用法代码示例。如果您正苦于以下问题:Java ReadOnlyIterator类的具体用法?Java ReadOnlyIterator怎么用?Java ReadOnlyIterator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ReadOnlyIterator类属于com.sun.xml.internal.stream.util包,在下文中一共展示了ReadOnlyIterator类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getPrefixes
import com.sun.xml.internal.stream.util.ReadOnlyIterator; //导入依赖的package包/类
public java.util.Iterator getPrefixes(String uri) {
Vector prefixes = null;
Iterator itr = null;
if (uri != null) {
uri = fSymbolTable.addSymbol(uri);
}
if (userContext != null) {
itr = userContext.getPrefixes(uri);
}
if (internalContext != null) {
prefixes = internalContext.getPrefixes(uri);
}
if ((prefixes == null) && (itr != null)) {
return itr;
} else if ((prefixes != null) && (itr == null)) {
return new ReadOnlyIterator(prefixes.iterator());
} else if ((prefixes != null) && (itr != null)) {
String ob = null;
while (itr.hasNext()) {
ob = (String) itr.next();
if (ob != null) {
ob = fSymbolTable.addSymbol(ob);
}
if (!prefixes.contains(ob)) {
prefixes.add(ob);
}
}
return new ReadOnlyIterator(prefixes.iterator());
}
return fReadOnlyIterator;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:41,代码来源:XMLStreamWriterImpl.java
示例2: getAttributes
import com.sun.xml.internal.stream.util.ReadOnlyIterator; //导入依赖的package包/类
public Iterator getAttributes() {
if(fAttributes != null){
Collection coll = fAttributes.values();
return new ReadOnlyIterator(coll.iterator());
}
return new ReadOnlyIterator();
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:StartElementEvent.java
示例3: getPrefixes
import com.sun.xml.internal.stream.util.ReadOnlyIterator; //导入依赖的package包/类
public Iterator<String> getPrefixes(String uri) {
Vector prefixes = null;
Iterator<String> itr = null;
if (uri != null) {
uri = fSymbolTable.addSymbol(uri);
}
if (userContext != null) {
itr = userContext.getPrefixes(uri);
}
if (internalContext != null) {
prefixes = internalContext.getPrefixes(uri);
}
if ((prefixes == null) && (itr != null)) {
return itr;
} else if ((prefixes != null) && (itr == null)) {
return new ReadOnlyIterator<>(prefixes.iterator());
} else if ((prefixes != null) && (itr != null)) {
String ob = null;
while (itr.hasNext()) {
ob = itr.next();
if (ob != null) {
ob = fSymbolTable.addSymbol(ob);
}
if (!prefixes.contains(ob)) {
prefixes.add(ob);
}
}
return new ReadOnlyIterator<>(prefixes.iterator());
}
return fReadOnlyIterator;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:41,代码来源:XMLStreamWriterImpl.java
示例4: getNamespaces
import com.sun.xml.internal.stream.util.ReadOnlyIterator; //导入依赖的package包/类
/**
* Returns an Iterator of namespaces that have gone out of scope. Returns an
* empty iterator if no namespaces have gone out of scope.
*
* @return an Iterator over Namespace interfaces, or an empty iterator
*/
@Override
public Iterator<Namespace> getNamespaces() {
if (fNamespaces != null) {
fNamespaces.iterator();
}
return new ReadOnlyIterator<>();
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:14,代码来源:EndElementEvent.java
示例5: getAttributes
import com.sun.xml.internal.stream.util.ReadOnlyIterator; //导入依赖的package包/类
@Override
public Iterator<Attribute> getAttributes() {
if (fAttributes != null) {
Collection<Attribute> coll = fAttributes.values();
return new ReadOnlyIterator<>(coll.iterator());
}
return new ReadOnlyIterator<>();
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:9,代码来源:StartElementEvent.java
示例6: getNamespaces
import com.sun.xml.internal.stream.util.ReadOnlyIterator; //导入依赖的package包/类
@Override
public Iterator<Namespace> getNamespaces() {
if (fNamespaces != null) {
return new ReadOnlyIterator<>(fNamespaces.iterator());
}
return new ReadOnlyIterator<>();
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:8,代码来源:StartElementEvent.java
示例7: getNamespaces
import com.sun.xml.internal.stream.util.ReadOnlyIterator; //导入依赖的package包/类
public Iterator getNamespaces() {
if(fNamespaces != null){
return new ReadOnlyIterator(fNamespaces.iterator());
}
return new ReadOnlyIterator();
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:7,代码来源:StartElementEvent.java
示例8: getNamespaces
import com.sun.xml.internal.stream.util.ReadOnlyIterator; //导入依赖的package包/类
/** Returns an Iterator of namespaces that have gone out
* of scope. Returns an empty iterator if no namespaces have gone
* out of scope.
* @return an Iterator over Namespace interfaces, or an
* empty iterator
*/
public Iterator getNamespaces() {
if(fNamespaces != null)
fNamespaces.iterator();
return new ReadOnlyIterator();
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:EndElementEvent.java
注:本文中的com.sun.xml.internal.stream.util.ReadOnlyIterator类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论