prefixmap.java
来自「Mofire的JAR压缩包」· Java 代码 · 共 64 行
JAVA
64 行
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space
// Source File Name: PrefixMap.java
package org.kxml;
public class PrefixMap
{
public static final PrefixMap DEFAULT = new PrefixMap(null, "", "");
String prefix;
String namespace;
PrefixMap previous;
public PrefixMap(PrefixMap previous, String prefix, String namespace)
{
this.previous = previous;
this.prefix = prefix;
this.namespace = namespace;
}
public String getNamespace()
{
return namespace;
}
public String getPrefix()
{
return prefix;
}
public PrefixMap getPrevious()
{
return previous;
}
public String getNamespace(String prefix)
{
PrefixMap current = this;
do
{
if (prefix.equals(current.prefix))
return current.namespace;
current = current.previous;
} while (current != null);
return null;
}
public String getPrefix(String namespace)
{
PrefixMap current = this;
do
{
if (namespace.equals(current.namespace) && namespace.equals(getNamespace(current.prefix)))
return current.prefix;
current = current.previous;
} while (current != null);
return null;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?