Skip to content

Commit

Permalink
Removed unnecessary comparable
Browse files Browse the repository at this point in the history
  • Loading branch information
craigtaverner committed Mar 21, 2017
1 parent d0458bd commit d2631cd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,9 @@ public int compareTo( SchemaDescriptor o )
return -1;
}
}

public interface Supplier extends SchemaDescriptor.Supplier
{
LabelSchemaDescriptor schema();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,25 +92,4 @@ public int hashCode()
{
return Arrays.hashCode( propertyIds ) + 31 * relTypeId;
}

@Override
public int compareTo( SchemaDescriptor o )
{
if ( o instanceof RelationTypeSchemaDescriptor )
{
RelationTypeSchemaDescriptor other = (RelationTypeSchemaDescriptor) o;
if ( relTypeId == other.getRelTypeId() )
{
return SchemaUtil.comparePropertyKeyIds( propertyIds, other.getPropertyIds() );
}
else
{
return relTypeId - other.getRelTypeId();
}
}
else
{
return -1;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* how this is done in eg. LabelSchemaDescriptor, and the SchemaProcessor and SchemaComputer interfaces need to be
* extended with methods taking the new concrete type as argument.
*/
public interface SchemaDescriptor extends Comparable<SchemaDescriptor>
public interface SchemaDescriptor
{
/**
* Computes some value by feeding this object into the given SchemaComputer.
Expand Down

0 comments on commit d2631cd

Please sign in to comment.