Package discord4j.gateway
Class ShardInfo
java.lang.Object
discord4j.gateway.ShardInfo
A container to express a shard index and count.
-
Method Summary
Modifier and TypeMethodDescriptionint[]asArray()Return thisShardInfoobject in array representation: [index, count]static ShardInfocreate(int index, int count) booleanformat()Return a string form of thisShardInfousing the following pattern:index,countintgetCount()Return the shard count represented by thisShardInfo.intgetIndex()Return the shard index represented by thisShardInfo.inthashCode()toString()
-
Method Details
-
create
-
getIndex
public int getIndex()Return the shard index represented by thisShardInfo.- Returns:
- the shard number (0-based)
-
getCount
public int getCount()Return the shard count represented by thisShardInfo.- Returns:
- the number of shards
-
asArray
public int[] asArray()Return thisShardInfoobject in array representation: [index, count]- Returns:
- an array with 2 elements,
indexandcount
-
equals
-
hashCode
public int hashCode() -
format
Return a string form of thisShardInfousing the following pattern:index,count- Returns:
- a formatted string representing this object
-
toString
-