private IndexIdentifier(TitanIndex index) { Preconditions.checkArgument(index != null); indexName = index.name(); if (index instanceof RelationTypeIndex) relationTypeName = ((RelationTypeIndex) index).getType().name(); else relationTypeName = null; Preconditions.checkArgument(StringUtils.isNotBlank(indexName)); hashcode = new HashCodeBuilder().append(indexName).append(relationTypeName).hashCode(); }
final String relationTypeName = RelationTypeIndex.class.isAssignableFrom(index.getClass()) ? ((RelationTypeIndex)index).getType().name() : ""; Preconditions.checkNotNull(indexName);
private IndexIdentifier(TitanIndex index) { Preconditions.checkArgument(index != null); indexName = index.name(); if (index instanceof RelationTypeIndex) relationTypeName = ((RelationTypeIndex) index).getType().name(); else relationTypeName = null; Preconditions.checkArgument(StringUtils.isNotBlank(indexName)); hashcode = new HashCodeBuilder().append(indexName).append(relationTypeName).hashCode(); }
final String relationTypeName = RelationTypeIndex.class.isAssignableFrom(index.getClass()) ? ((RelationTypeIndex)index).getType().name() : ""; Preconditions.checkNotNull(indexName);