mirror of https://github.com/apache/cassandra
ninja-add missing .hashCode() in new fqltool classes
This commit is contained in:
parent
876666abe7
commit
a0636881f4
|
|
@ -22,6 +22,7 @@ import java.nio.ByteBuffer;
|
|||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.google.common.collect.AbstractIterator;
|
||||
|
|
@ -137,6 +138,11 @@ public class DriverResultSet implements ResultHandler.ComparableResultSet
|
|||
return true;
|
||||
}
|
||||
|
||||
public int hashCode()
|
||||
{
|
||||
return Objects.hash(row);
|
||||
}
|
||||
|
||||
public String toString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
|
@ -210,6 +216,11 @@ public class DriverResultSet implements ResultHandler.ComparableResultSet
|
|||
|
||||
return asList().equals(o.asList());
|
||||
}
|
||||
|
||||
public int hashCode()
|
||||
{
|
||||
return Objects.hash(columnDefinitions, failed, failureException);
|
||||
}
|
||||
}
|
||||
|
||||
public static class DriverDefinition implements ResultHandler.ComparableDefinition
|
||||
|
|
@ -239,6 +250,11 @@ public class DriverResultSet implements ResultHandler.ComparableResultSet
|
|||
return def.equals(((DriverDefinition)oo).def);
|
||||
}
|
||||
|
||||
public int hashCode()
|
||||
{
|
||||
return Objects.hash(def);
|
||||
}
|
||||
|
||||
public String toString()
|
||||
{
|
||||
return getName() + ':' + getType();
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ import java.nio.ByteBuffer;
|
|||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
|
@ -148,6 +149,11 @@ public class StoredResultSet implements ResultHandler.ComparableResultSet
|
|||
return row.equals(((StoredComparableRow)other).row);
|
||||
}
|
||||
|
||||
public int hashCode()
|
||||
{
|
||||
return Objects.hash(row, cds);
|
||||
}
|
||||
|
||||
public String toString()
|
||||
{
|
||||
return row.stream().map(ByteBufferUtil::bytesToHex).collect(Collectors.joining(","));
|
||||
|
|
@ -198,6 +204,11 @@ public class StoredResultSet implements ResultHandler.ComparableResultSet
|
|||
return defs.equals(((StoredComparableColumnDefinitions)other).defs);
|
||||
}
|
||||
|
||||
public int hashCode()
|
||||
{
|
||||
return Objects.hash(defs, wasFailed, failureException);
|
||||
}
|
||||
|
||||
public String toString()
|
||||
{
|
||||
return defs.toString();
|
||||
|
|
@ -229,6 +240,11 @@ public class StoredResultSet implements ResultHandler.ComparableResultSet
|
|||
return p.equals(((StoredComparableDefinition)other).p);
|
||||
}
|
||||
|
||||
public int hashCode()
|
||||
{
|
||||
return Objects.hash(p);
|
||||
}
|
||||
|
||||
public String toString()
|
||||
{
|
||||
return getName() + ':' + getType();
|
||||
|
|
|
|||
Loading…
Reference in New Issue