Class Samsara
java.lang.Object
org.miaixz.bus.core.center.date.culture.Tradition
org.miaixz.bus.core.center.date.culture.Loops
org.miaixz.bus.core.center.date.culture.Samsara
- Direct Known Subclasses:
Animal,Beast,Climate,Dipper,Direction,Dog,Duty,EarthBranch,Ecliptic,Element,FetusEarthBranch,FetusHeavenStem,FetusMonth,HeavenStem,Land,Luck,LunarSeason,Nine,NineStar,PengZuEarthBranch,PengZuHeavenStem,Phase,SevenStar,Sixty,SixtyCycle,SolarTerms,Sound,Ten,TenStar,Terrain,ThreeClimate,TwelveStar,Twenty,TwentyEightStar,Week,Zodiac,Zone
轮回的信息
季度/月/星期/日/小时/分钟等
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Field Details
-
names
名称列表 -
index
protected int index索引,从0开始
-
-
Constructor Details
-
Samsara
通过索引初始化- Parameters:
names- 名称列表index- 索引,支持负数,自动轮转
-
Samsara
通过名称初始化- Parameters:
names- 名称列表name- 名称
-
-
Method Details
-
getName
名称- Returns:
- 名称
-
getIndex
public int getIndex()索引- Returns:
- 索引,从0开始
-
getSize
public int getSize()数量- Returns:
- 数量
-
indexOf
名称对应的索引- Parameters:
name- 名称- Returns:
- 索引,从0开始
-
indexOf
protected int indexOf(int index) 转换为不超范围的索引- Parameters:
index- 索引- Returns:
- 索引,从0开始
-
nextIndex
protected int nextIndex(int n) 推移后的索引- Parameters:
n- 推移步数- Returns:
- 索引,从0开始
-