📄 table.java
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi
// Source File Name: Table.java
package App;
// Referenced classes of package App:
// TableNode
class Table
{
class WeightHight
{
int w;
int h;
void setW(int w)
{
this.w = w;
}
void setH(int h)
{
this.h = h;
}
public WeightHight()
{
}
public WeightHight(int w, int h)
{
this.w = w;
this.h = h;
}
}
protected TableNode tables[];
protected int number;
protected int treeCeng;
public Table()
{
this(1000);
}
public Table(int number)
{
tables = new TableNode[number];
}
int search(Object name)
{
int i;
for(i = 0; tables[i].name != null && !tables[i].name.equals(name); i++);
if(tables[i].name != null)
return i;
else
return -1;
}
void creatTable(String s)
{
int i = 0;
int n = 0;
String fa = s.substring(i, i + 1);
for(String ch = s.substring(i + 1, i + 2); ch.compareTo("#") != 0; ch = s.substring(i + 1, i + 2))
{
int j;
if(fa.compareTo("#") == 0)
tables[0] = new TableNode(ch, -1, 1);
else
if((j = search(fa)) != -1)
tables[n] = new TableNode(ch, j, tables[j].ceng + 1);
n++;
i += 2;
fa = s.substring(i, i + 1);
}
number = n;
treeCeng = tables[number - 1].ceng;
for(i = 0; tables[i] != null; i++)
{
if(i == 0)
{
tables[i].SiblingNumbers = 1;
tables[i].locate = 1;
continue;
}
if(tables[i].parents != tables[i - 1].parents)
tables[i].locate = 1;
else
tables[i].locate = tables[i - 1].locate + 1;
}
tables[number - 1].SiblingNumbers = tables[number - 1].locate;
for(i = number - 2; i > 0; i--)
if(tables[i].parents != tables[i + 1].parents)
tables[i].SiblingNumbers = tables[i].locate;
else
tables[i].SiblingNumbers = tables[i + 1].SiblingNumbers;
}
void xAndy()
{
WeightHight wh[] = new WeightHight[treeCeng + 1];
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -