com.infomaximum.database.schema.table.THashIndex Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rdao Show documentation
Show all versions of rdao Show documentation
Library for creating a light cluster
The newest version!
package com.infomaximum.database.schema.table;
import java.util.Arrays;
public class THashIndex extends TBaseIndex {
private final String[] fields;
public THashIndex(String... fields) {
if (fields.length == 0) {
throw new IllegalArgumentException();
}
this.fields = fields;
}
public THashIndex(TField... fields) {
this(Arrays.stream(fields).map(TField::getName).toArray(String[]::new));
}
public String[] getFields() {
return fields;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
THashIndex hashIndex = (THashIndex) o;
return Arrays.equals(fields, hashIndex.fields);
}
@Override
public int hashCode() {
return Arrays.hashCode(fields);
}
@Override
public String toString() {
return "HashIndex{" +
"fields=" + Arrays.toString(fields) +
'}';
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy