📄 iteratorstatus.java
字号:
// 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: IteratorStatus.java
package org.apache.struts2.views.jsp;
public class IteratorStatus
{
public static class StatusState
{
boolean last;
int index;
public void setLast(boolean isLast)
{
last = isLast;
}
public void next()
{
index++;
}
public StatusState()
{
last = false;
index = 0;
}
}
protected StatusState state;
public IteratorStatus(StatusState aState)
{
state = aState;
}
public int getCount()
{
return state.index + 1;
}
public boolean isEven()
{
return (state.index + 1) % 2 == 0;
}
public boolean isFirst()
{
return state.index == 0;
}
public int getIndex()
{
return state.index;
}
public boolean isLast()
{
return state.last;
}
public boolean isOdd()
{
return (state.index + 1) % 2 == 1;
}
public int modulus(int operand)
{
return (state.index + 1) % operand;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -