Class IndexAddress
- java.lang.Object
-
- com.exonum.binding.core.storage.indices.IndexAddress
-
public final class IndexAddress extends Object
An Exonum index address: a pair of the name and an optional id in a group, which identifies an Exonum index.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Optional<byte[]>
getIdInGroup()
Returns the index id in a group if it belongs to one, otherwise returns an empty optional.String
getName()
Returns the name of the index or index group.int
hashCode()
String
toString()
static IndexAddress
valueOf(String name)
Creates an address of an individual index.static IndexAddress
valueOf(String groupName, byte[] idInGroup)
Creates an address of an index belonging to an index group.
-
-
-
Method Detail
-
valueOf
public static IndexAddress valueOf(String name)
Creates an address of an individual index.- Parameters:
name
- the name of the index
-
valueOf
public static IndexAddress valueOf(String groupName, byte[] idInGroup)
Creates an address of an index belonging to an index group.- Parameters:
groupName
- the name of the index groupidInGroup
- the id of the index in group
-
getName
public String getName()
Returns the name of the index or index group.
-
getIdInGroup
public Optional<byte[]> getIdInGroup()
Returns the index id in a group if it belongs to one, otherwise returns an empty optional.
-
-