Merge pull request #1381 from thatsIch/e-overriden-annotions
Adds annotations by contract of the interface
This commit is contained in:
commit
503d325021
|
@ -19,6 +19,8 @@
|
||||||
package appeng.client.me;
|
package appeng.client.me;
|
||||||
|
|
||||||
|
|
||||||
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
import net.minecraft.util.StatCollector;
|
import net.minecraft.util.StatCollector;
|
||||||
|
|
||||||
import appeng.tile.inventory.AppEngInternalInventory;
|
import appeng.tile.inventory.AppEngInternalInventory;
|
||||||
|
@ -52,7 +54,7 @@ public class ClientDCInternalInv implements Comparable<ClientDCInternalInv>
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int compareTo( ClientDCInternalInv o )
|
public int compareTo( @Nonnull ClientDCInternalInv o )
|
||||||
{
|
{
|
||||||
return ItemSorters.compareLong( this.sortBy, o.sortBy );
|
return ItemSorters.compareLong( this.sortBy, o.sortBy );
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
package appeng.container.implementations;
|
package appeng.container.implementations;
|
||||||
|
|
||||||
|
|
||||||
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
import appeng.api.networking.crafting.ICraftingCPU;
|
import appeng.api.networking.crafting.ICraftingCPU;
|
||||||
import appeng.util.ItemSorters;
|
import appeng.util.ItemSorters;
|
||||||
|
|
||||||
|
@ -40,7 +42,7 @@ public class CraftingCPURecord implements Comparable<CraftingCPURecord>
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int compareTo( CraftingCPURecord o )
|
public int compareTo( @Nonnull CraftingCPURecord o )
|
||||||
{
|
{
|
||||||
int a = ItemSorters.compareLong( o.processors, this.processors );
|
int a = ItemSorters.compareLong( o.processors, this.processors );
|
||||||
if( a != 0 )
|
if( a != 0 )
|
||||||
|
|
|
@ -22,6 +22,7 @@ package appeng.crafting;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
import appeng.api.networking.crafting.ICraftingWatcher;
|
import appeng.api.networking.crafting.ICraftingWatcher;
|
||||||
import appeng.api.networking.crafting.ICraftingWatcherHost;
|
import appeng.api.networking.crafting.ICraftingWatcherHost;
|
||||||
|
@ -68,20 +69,23 @@ public class CraftingWatcher implements ICraftingWatcher
|
||||||
return this.myInterests.contains( o );
|
return this.myInterests.contains( o );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nonnull
|
||||||
@Override
|
@Override
|
||||||
public Iterator<IAEStack> iterator()
|
public Iterator<IAEStack> iterator()
|
||||||
{
|
{
|
||||||
return new ItemWatcherIterator( this, this.myInterests.iterator() );
|
return new ItemWatcherIterator( this, this.myInterests.iterator() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nonnull
|
||||||
@Override
|
@Override
|
||||||
public Object[] toArray()
|
public Object[] toArray()
|
||||||
{
|
{
|
||||||
return this.myInterests.toArray();
|
return this.myInterests.toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nonnull
|
||||||
@Override
|
@Override
|
||||||
public <T> T[] toArray( T[] a )
|
public <T> T[] toArray( @Nonnull T[] a )
|
||||||
{
|
{
|
||||||
return this.myInterests.toArray( a );
|
return this.myInterests.toArray( a );
|
||||||
}
|
}
|
||||||
|
@ -104,13 +108,13 @@ public class CraftingWatcher implements ICraftingWatcher
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean containsAll( Collection<?> c )
|
public boolean containsAll( @Nonnull Collection<?> c )
|
||||||
{
|
{
|
||||||
return this.myInterests.containsAll( c );
|
return this.myInterests.containsAll( c );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean addAll( Collection<? extends IAEStack> c )
|
public boolean addAll( @Nonnull Collection<? extends IAEStack> c )
|
||||||
{
|
{
|
||||||
boolean didChange = false;
|
boolean didChange = false;
|
||||||
|
|
||||||
|
@ -123,7 +127,7 @@ public class CraftingWatcher implements ICraftingWatcher
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean removeAll( Collection<?> c )
|
public boolean removeAll( @Nonnull Collection<?> c )
|
||||||
{
|
{
|
||||||
boolean didSomething = false;
|
boolean didSomething = false;
|
||||||
for( Object o : c )
|
for( Object o : c )
|
||||||
|
@ -134,7 +138,7 @@ public class CraftingWatcher implements ICraftingWatcher
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean retainAll( Collection<?> c )
|
public boolean retainAll( @Nonnull Collection<?> c )
|
||||||
{
|
{
|
||||||
boolean changed = false;
|
boolean changed = false;
|
||||||
Iterator<IAEStack> i = this.iterator();
|
Iterator<IAEStack> i = this.iterator();
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
package appeng.me.cache.helpers;
|
package appeng.me.cache.helpers;
|
||||||
|
|
||||||
|
|
||||||
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
import net.minecraft.crash.CrashReportCategory;
|
import net.minecraft.crash.CrashReportCategory;
|
||||||
|
|
||||||
import appeng.api.networking.IGridNode;
|
import appeng.api.networking.IGridNode;
|
||||||
|
@ -73,7 +75,7 @@ public class TickTracker implements Comparable<TickTracker>
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int compareTo( TickTracker t )
|
public int compareTo( @Nonnull TickTracker t )
|
||||||
{
|
{
|
||||||
int nextTick = (int) ( ( this.lastTick - this.host.getCurrentTick() ) + this.current_rate );
|
int nextTick = (int) ( ( this.lastTick - this.host.getCurrentTick() ) + this.current_rate );
|
||||||
int ts_nextTick = (int) ( ( t.lastTick - this.host.getCurrentTick() ) + t.current_rate );
|
int ts_nextTick = (int) ( ( t.lastTick - this.host.getCurrentTick() ) + t.current_rate );
|
||||||
|
|
|
@ -27,6 +27,7 @@ import java.util.concurrent.Executors;
|
||||||
import java.util.concurrent.Future;
|
import java.util.concurrent.Future;
|
||||||
import java.util.concurrent.ThreadFactory;
|
import java.util.concurrent.ThreadFactory;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
@ -175,7 +176,7 @@ public class CompassService implements ThreadFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Thread newThread( Runnable job )
|
public Thread newThread( @Nonnull Runnable job )
|
||||||
{
|
{
|
||||||
return new Thread( job, "AE Compass Service" );
|
return new Thread( job, "AE Compass Service" );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue