Skip to content

Commit

Permalink
Cleanup after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
burqen committed Feb 15, 2018
1 parent 4880309 commit 98c3635
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
Expand Up @@ -54,7 +54,7 @@ public SpatialSchemaKey copyKey( SpatialSchemaKey key, SpatialSchemaKey into )
{
into.rawValueBits = key.rawValueBits;
into.setEntityId( key.getEntityId() );
into.setEntityIdIsSpecialTieBreaker( key.getEntityIdIsSpecialTieBreaker() );
into.setCompareId( key.getCompareId() );
into.crs = key.crs;
into.curve = key.curve;
return into;
Expand Down
Expand Up @@ -63,7 +63,7 @@ public int compare( SpatialSchemaKey o1, SpatialSchemaKey o2 )
if ( comparison == 0 )
{
// This is a special case where we need also compare entityId to support inclusive/exclusive
if ( o1.getEntityIdIsSpecialTieBreaker() || o2.getEntityIdIsSpecialTieBreaker() )
if ( o1.getCompareId() || o2.getCompareId() )
{
return Long.compare( o1.getEntityId(), o2.getEntityId() );
}
Expand Down
Expand Up @@ -41,7 +41,7 @@ class SpatialSchemaKey implements NativeSchemaKey
Long.BYTES; /* entityId */

private long entityId;
private boolean entityIdIsSpecialTieBreaker;
private boolean compareId;

long rawValueBits;
CoordinateReferenceSystem crs;
Expand All @@ -54,15 +54,15 @@ class SpatialSchemaKey implements NativeSchemaKey
}

@Override
public void setEntityIdIsSpecialTieBreaker( boolean entityIdIsSpecialTieBreaker )
public void setCompareId( boolean entityIdIsSpecialTieBreaker )
{
this.entityIdIsSpecialTieBreaker = entityIdIsSpecialTieBreaker;
this.compareId = entityIdIsSpecialTieBreaker;
}

@Override
public boolean getEntityIdIsSpecialTieBreaker()
public boolean getCompareId()
{
return entityIdIsSpecialTieBreaker;
return compareId;
}

@Override
Expand All @@ -82,7 +82,7 @@ public void from( long entityId, Value... values )
{
extractRawBits( assertValidValue( values ) );
this.entityId = entityId;
entityIdIsSpecialTieBreaker = false;
compareId = false;
}

@Override
Expand All @@ -109,7 +109,7 @@ public void initAsLowest()
Arrays.fill(limit, Double.NEGATIVE_INFINITY);
writePoint( limit );
entityId = Long.MIN_VALUE;
entityIdIsSpecialTieBreaker = true;
compareId = true;
}

@Override
Expand All @@ -120,14 +120,14 @@ public void initAsHighest()
double[] limit = {Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY};
writePoint( limit );
entityId = Long.MAX_VALUE;
entityIdIsSpecialTieBreaker = true;
compareId = true;
}

public void fromDerivedValue( long entityId, long derivedValue )
{
rawValueBits = derivedValue;
this.entityId = entityId;
this.entityIdIsSpecialTieBreaker = false;
this.compareId = false;
}

/**
Expand Down

0 comments on commit 98c3635

Please sign in to comment.