// 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
package java.util.regex;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.PrintStream;
import java.io.Serializable;
import java.text.Normalizer;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
// Referenced classes of package java.util.regex:
// ASCII, Matcher, PatternSyntaxException
public final class Pattern
implements Serializable
{
static final class All extends CharProperty
{
boolean isSatisfiedBy(int i)
{
return true;
}
All()
{
}
}
static class BackRef extends Node
{
int groupIndex;
boolean match(Matcher matcher1, int i, CharSequence charsequence)
{
int j = matcher1.groups[groupIndex];
int k = matcher1.groups[groupIndex + 1];
int l = k - j;
if (j < 0)
return false;
if (i + l > matcher1.to)
{
matcher1.hitEnd = true;
return false;
}
for (int i1 = 0; i1 < l; i1++)
if (charsequence.charAt(i + i1) != charsequence.charAt(j + i1))
return false;
return next.match(matcher1, i + l, charsequence);
}
boolean study(TreeInfo treeinfo)
{
treeinfo.maxValid = false;
return next.study(treeinfo);
}
BackRef(int i)
{
groupIndex = i + i;
}
}
static final class Begin extends Node
{
boolean match(Matcher matcher1, int i, CharSequence charsequence)
{
int j = matcher1.anchoringBounds ? matcher1.from : 0;
if (i == j && next.match(matcher1, i, charsequence))
{
matcher1.first = i;
matcher1.groups[0] = i;
matcher1.groups[1] = matcher1.last;
return true;
} else
{
return false;
}
}
Begin()
{
}
}
static class Behind extends Node
{
Node cond;
int rmax;
int rmin;
boolean match(Matcher matcher1, int i, CharSequence charsequence)
{
int j = matcher1.from;
boolean flag = false;
int k = matcher1.transparentBounds ? 0 : matcher1.from;
int l = Math.max(i - rmax, k);
int i1 = matcher1.lookbehindTo;
matcher1.lookbehindTo = i;
if (matcher1.transparentBounds)
matcher1.from = 0;
for (int j1 = i - rmin; !flag && j1 >= l; j1--)
flag = cond.match(matcher1, j1, charsequence);
matcher1.from = j;
matcher1.lookbehindTo = i1;
return flag && next.match(matcher1, i, charsequence);
}
Behind(Node node, int i, int j)
{
cond = node;
rmax = i;
rmin = j;
}
}
static final class BehindS extends Behind
{
boolean match(Matcher matcher1, int i, CharSequence charsequence)
{
int j = Pattern.countChars(charsequence, i, -rmax);
int k = Pattern.countChars(charsequence, i, -rmin);
int l = matcher1.from;
int i1 = matcher1.transparentBounds ? 0 : matcher1.from;
boolean flag = false;
int j1 = Math.max(i - j, i1);
int k1 = matcher1.lookbehindTo;
matcher1.lookbehindTo = i;
if (matcher1.transparentBounds)
matcher1.from = 0;
for (int l1 = i - k; !flag && l1 >= j1; l1 -= l1 <= j1 ? 1 : Pattern.countChars(charsequence, l1, -1))
flag = cond.match(matcher1, l1, charsequence);
matcher1.from = l;
matcher1.lookbehindTo = k1;
return flag && next.match(matcher1, i, charsequence);
}
BehindS(Node node, int i, int j)
{
super(node, i, j);
}
}
private static final class BitClass extends BmpCharProperty
{
final boolean bits[];
static final boolean $assertionsDisabled = !java/util/regex/Pattern.desiredAssertionStatus();
BitClass add(int i, int j)
{
if (!$assertionsDisabled && (i < 0 || i > 255))
throw new AssertionError();
if ((j & 2) != 0)
if (ASCII.isAscii(i))
{
bits[ASCII.toUpper(i)] = true;
bits[ASCII.toLower(i)] = true;
} else
if ((j & 0x40) != 0)
{
bits[Character.toLowerCase(i)] = true;
bits[Character.toUpperCase(i)] = true;
}
bits[i] = true;
return this;
}
boolean isSatisfiedBy(int i)
{
return i < 256 && bits[i];
}
BitClass()
{
bits = new boolean[256];
}
private BitClass(boolean aflag[])
{
bits = aflag;
}
}
private static abstract class BmpCharProperty extends CharProperty
{
boolean match(Matcher matcher1, int i, CharSequence charsequence)
{
if (i < matcher1.to)
{
return isSatisfiedBy(charsequence.charAt(i)) && next.match(matcher1, i + 1, charsequence);
} else
{
matcher1.hitEnd = true;
return false;
}
}
private BmpCharProperty()
{
}
}
static class BnM extends Node
{
int buffer[];
int lastOcc[];
int optoSft[];
static Node optimize(Node node)
{
if (!(node instanceof Slice))
return node;
int ai[] = ((Slice)node).buffer;
int i = ai.length;
if (i < 4)
return node;
int ai1[] = new int[128];
int ai2[] = new int[i];
for (int j = 0; j < i; j++)
ai1[ai[j] & 0x7f] = j + 1;
label0:
for (int k = i; k > 0; k--)
{
int l;
for (l = i - 1; l >= k; l--)
{
if (ai[l] != ai[l - k])
continue label0;
ai2[l - 1] = k;
}
while (l > 0)
ai2[--l] = k;
}
ai2[i - 1] = 1;
if (node instanceof SliceS)
return new BnMS(ai, ai1, ai2, node.next);
else
return new BnM(ai, ai1, ai2, node.next);
}
boolean match(Matcher matcher1, int i, CharSequence charsequence)
{
int ai[] = buffer;
int j = ai.length;
int k = matcher1.to - j;
label0:
do
{
if (i > k)
break;
int l = j - 1;
do
{
if (l < 0)
break;
char c1 = charsequence.charAt(i + l);
if (c1 != ai[l])
{
i += Math.max((l + 1) - lastOcc[c1 & 0x7f], optoSft[l]);
continue label0;
}
l--;
} while (true);
matcher1.first = i;
boolean flag = next.match(matcher1, i + j, charsequence);
if (flag)
{
matcher1.first = i;
matcher1.groups[0] = matcher1.first;
matcher1.groups[1] = matcher1.last;
return true;
}
i++;
} while (true);
matcher1.hitEnd = true;
return false;
}
boolean study(TreeInfo treeinfo)
{
treeinfo.minLength += buffer.length;
treeinfo.maxValid = false;
return next.study(treeinfo);
}
BnM(int ai[], int ai1[], int ai2[], Node node)
{
buffer = ai;
lastOcc = ai1;
optoSft = ai2;
next = node;
}
}
static final class BnMS extends BnM
{
int lengthInChars;
boolean match(Matcher matcher1, int i, CharSequence charsequence)
{
int ai[] = buffer;
int j = ai.length;
int k = matcher1.to - lengthInChars;
label0:
do
{
if (i > k)
break;
int i1 = Pattern.countChars(charsequence, i, j);
int j1 = j - 1;
do
{
if (i1 <= 0)
break;
int l = Character.codePointBefore(charsequence, i + i1);
if (l != ai[j1])
{
int k1 = Math.max((j1 + 1) - lastOcc[l & 0x7f], optoSft[j1]);
i += Pattern.countChars(charsequence, i, k1);
continue label0;
}
i1 -= Character.charCount(l);
j1--;
} while (true);
matcher1.first = i;
boolean flag = next.match(matcher1, i + lengthInChars, charsequence);
if (flag)
{
matcher1.first = i;
matcher1.groups[0] = matcher1.first;
matcher1.groups[1] = matcher1.last;
return true;
}
i += Pattern.countChars(charsequence, i, 1);
} while (true);
matcher1.hitEnd = true;
return false;
}
BnMS(int ai[], int ai1[], int ai2[], Node node)
{
super(ai, ai1, ai2, node);
for (int i = 0; i < buffer.length; i++)
lengthInChars += Character.charCount(buffer[i]);
}
}
static final class Bound extends Node
{
没有合适的资源?快使用搜索试试~ 我知道了~
学习java开发应该了解的几个常用的基本核心类库
共541个文件
java:541个
5星 · 超过95%的资源 需积分: 48 27 下载量 167 浏览量
2009-07-18
11:36:08
上传
评论
收藏 678KB RAR 举报
温馨提示
学习java开发应该了解的几个常用的基本核心类库
资源推荐
资源详情
资源评论
收起资源包目录
学习java开发应该了解的几个常用的基本核心类库 (541个子文件)
Pattern.java 92KB
Collections.java 70KB
Character.java 62KB
Formatter.java 58KB
ObjectInputStream.java 57KB
ConcurrentSkipListMap.java 54KB
ObjectStreamClass.java 49KB
TreeMap.java 47KB
Arrays.java 46KB
JapaneseImperialCalendar.java 45KB
GregorianCalendar.java 41KB
ObjectOutputStream.java 39KB
Class.java 37KB
CharacterData00.java 36KB
Scanner.java 34KB
ResourceBundle.java 30KB
ClassLoader.java 27KB
AbstractQueuedLongSynchronizer.java 25KB
AbstractQueuedSynchronizer.java 25KB
Calendar.java 23KB
String.java 23KB
WindowsPreferences.java 22KB
AbstractPreferences.java 21KB
CopyOnWriteArrayList.java 21KB
ConcurrentHashMap.java 20KB
LogManager.java 20KB
Locale.java 20KB
ThreadPoolExecutor.java 18KB
SimpleTimeZone.java 18KB
Thread.java 18KB
IdentityHashMap.java 18KB
Date.java 17KB
SynchronousQueue.java 17KB
LinkedBlockingDeque.java 17KB
DatabaseMetaData.java 17KB
Hashtable.java 17KB
CharacterData01.java 16KB
Logger.java 16KB
File.java 16KB
ResultSet.java 16KB
HashMap.java 15KB
WeakHashMap.java 14KB
Properties.java 14KB
AbstractStringBuilder.java 14KB
LinkedBlockingQueue.java 14KB
EnumMap.java 13KB
ArrayBlockingQueue.java 13KB
ReentrantReadWriteLock.java 13KB
Win32FileSystem.java 12KB
ScheduledThreadPoolExecutor.java 12KB
Executors.java 12KB
ThreadGroup.java 12KB
SecurityManager.java 12KB
LinkedList.java 12KB
XmlSupport.java 12KB
BitSet.java 11KB
Method.java 11KB
StringBuffer.java 11KB
ArrayDeque.java 11KB
ZipOutputStream.java 11KB
Integer.java 11KB
CharacterData02.java 10KB
JarFile.java 10KB
ThreadInfo.java 10KB
Vector.java 10KB
StringBuilder.java 10KB
FileHandler.java 10KB
Constructor.java 10KB
Long.java 10KB
Package.java 10KB
DriverManager.java 10KB
Field.java 10KB
CallableStatement.java 9KB
Matcher.java 9KB
AbstractMap.java 9KB
ZipFile.java 9KB
PrintStream.java 9KB
TimeZone.java 9KB
StreamTokenizer.java 9KB
Attributes.java 9KB
System.java 9KB
PrintWriter.java 9KB
ProcessEnvironment.java 9KB
PriorityQueue.java 9KB
DelayQueue.java 9KB
PriorityBlockingQueue.java 8KB
RandomAccessFile.java 8KB
JarVerifier.java 8KB
ZipInputStream.java 8KB
StringCoding.java 8KB
ThreadLocal.java 8KB
TimeUnit.java 8KB
ConcurrentLinkedQueue.java 8KB
AtomicLongFieldUpdater.java 8KB
FilePermission.java 7KB
ConditionalSpecialCasing.java 7KB
Console.java 7KB
BufferedReader.java 7KB
Currency.java 7KB
AbstractExecutorService.java 7KB
共 541 条
- 1
- 2
- 3
- 4
- 5
- 6
资源评论
- lx69468332015-11-01it really useful
zhongnanchangsha
- 粉丝: 0
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功