Fixed/Removed some wrong JavaDocs

This commit is contained in:
MattBDev 2019-10-25 13:40:13 -04:00
parent ca843f1b90
commit d20b8ddb2a
7 changed files with 22 additions and 35 deletions

View File

@ -89,10 +89,10 @@ public class DistrFilter extends ForkedFilter<DistrFilter> {
} }
public void print(Actor actor, long size) { public void print(Actor actor, long size) {
for (Countable c : getDistribution()) { for (Countable<BlockState> c : getDistribution()) {
final String name = c.getID().toString(); final String name = c.getID().toString();
final String str = String.format("%-7s (%.3f%%) %s", final String str = String.format("%-7s (%.3f%%) %s",
String.valueOf(c.getAmount()), c.getAmount(),
c.getAmount() / (double) size * 100, c.getAmount() / (double) size * 100,
name); name);
actor.print(str); actor.print(str);

View File

@ -1,13 +1,10 @@
package com.boydti.fawe.beta.implementation; package com.boydti.fawe.beta.implementation;
import com.boydti.fawe.beta.IChunkGet;
import com.boydti.fawe.beta.Trimable; import com.boydti.fawe.beta.Trimable;
import com.boydti.fawe.util.MathMan; import com.boydti.fawe.util.MathMan;
import com.sk89q.worldedit.world.World;
import it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap; import it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap;
import it.unimi.dsi.fastutil.longs.Long2ObjectMap; import it.unimi.dsi.fastutil.longs.Long2ObjectMap;
import it.unimi.dsi.fastutil.objects.ObjectIterator; import it.unimi.dsi.fastutil.objects.ObjectIterator;
import java.lang.ref.WeakReference; import java.lang.ref.WeakReference;
public class ChunkCache<T extends Trimable> implements IChunkCache<T> { public class ChunkCache<T extends Trimable> implements IChunkCache<T> {
@ -20,13 +17,6 @@ public class ChunkCache<T extends Trimable> implements IChunkCache<T> {
this.delegate = delegate; this.delegate = delegate;
} }
/**
* Get or create the IGetBlocks
*
* @param index chunk index {@link com.boydti.fawe.util.MathMan#pairInt(int, int)}
* @param provider used to create if it isn't already cached
* @return cached IGetBlocks
*/
@Override @Override
public synchronized T get(int x, int z) { public synchronized T get(int x, int z) {
long pair = MathMan.pairInt(x, z); long pair = MathMan.pairInt(x, z);

View File

@ -27,15 +27,12 @@ import com.sk89q.worldedit.world.block.BaseBlock;
import com.sk89q.worldedit.world.block.BlockState; import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockStateHolder; import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockType; import com.sk89q.worldedit.world.block.BlockType;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.concurrent.ForkJoinTask; import java.util.concurrent.ForkJoinTask;
import java.util.stream.IntStream; import java.util.stream.IntStream;
import static com.google.common.base.Preconditions.checkNotNull;
public class ParallelQueueExtent extends PassthroughExtent implements IQueueWrapper { public class ParallelQueueExtent extends PassthroughExtent implements IQueueWrapper {
private final World world; private final World world;
@ -229,7 +226,7 @@ public class ParallelQueueExtent extends PassthroughExtent implements IQueueWrap
* returned by a given pattern. * returned by a given pattern.
* *
* @param region the region to replace the blocks within * @param region the region to replace the blocks within
* @param filter a list of block types to match, or null to use {@link com.sk89q.worldedit.function.mask.ExistingBlockMask} * @param filter a list of block types to match, or null to use {@link ExistingBlockMask}
* @param replacement the replacement block * @param replacement the replacement block
* @return number of blocks affected * @return number of blocks affected
* @throws MaxChangedBlocksException thrown if too many blocks are changed * @throws MaxChangedBlocksException thrown if too many blocks are changed
@ -244,7 +241,7 @@ public class ParallelQueueExtent extends PassthroughExtent implements IQueueWrap
* returned by a given pattern. * returned by a given pattern.
* *
* @param region the region to replace the blocks within * @param region the region to replace the blocks within
* @param filter a list of block types to match, or null to use {@link com.sk89q.worldedit.function.mask.ExistingBlockMask} * @param filter a list of block types to match, or null to use {@link ExistingBlockMask}
* @param pattern the pattern that provides the new blocks * @param pattern the pattern that provides the new blocks
* @return number of blocks affected * @return number of blocks affected
* @throws MaxChangedBlocksException thrown if too many blocks are changed * @throws MaxChangedBlocksException thrown if too many blocks are changed

View File

@ -203,7 +203,7 @@ public class Config {
private Map<String, Object> getFields(Class clazz) { private Map<String, Object> getFields(Class clazz) {
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
for (Field field : clazz.getFields()) { for (Field field : clazz.getFields()) {
if (java.lang.reflect.Modifier.isStatic(field.getModifiers())) { if (Modifier.isStatic(field.getModifiers())) {
try { try {
map.put(toNodeName(field.getName()), field.get(null)); map.put(toNodeName(field.getName()), field.get(null));
} catch (IllegalAccessException e) { } catch (IllegalAccessException e) {

View File

@ -9,8 +9,8 @@ public interface Configuration extends ConfigurationSection {
/** /**
* Sets the default value of the given path as provided. * Sets the default value of the given path as provided.
* <p> * <p>
* If no source {@link com.boydti.fawe.configuration.Configuration} was provided as a default * If no source {@link Configuration} was provided as a default
* collection, then a new {@link com.boydti.fawe.configuration.MemoryConfiguration} will be created to * collection, then a new {@link MemoryConfiguration} will be created to
* hold the new default value. * hold the new default value.
* <p> * <p>
* If value is null, the value will be removed from the default * If value is null, the value will be removed from the default
@ -26,8 +26,8 @@ public interface Configuration extends ConfigurationSection {
/** /**
* Sets the default values of the given paths as provided. * Sets the default values of the given paths as provided.
* <p> * <p>
* If no source {@link com.boydti.fawe.configuration.Configuration} was provided as a default * If no source {@link Configuration} was provided as a default
* collection, then a new {@link com.boydti.fawe.configuration.MemoryConfiguration} will be created to * collection, then a new {@link MemoryConfiguration} will be created to
* hold the new default values. * hold the new default values.
* *
* @param defaults A map of Path->Values to add to defaults. * @param defaults A map of Path->Values to add to defaults.
@ -38,22 +38,22 @@ public interface Configuration extends ConfigurationSection {
/** /**
* Sets the default values of the given paths as provided. * Sets the default values of the given paths as provided.
* <p> * <p>
* If no source {@link com.boydti.fawe.configuration.Configuration} was provided as a default * If no source {@link Configuration} was provided as a default
* collection, then a new {@link com.boydti.fawe.configuration.MemoryConfiguration} will be created to * collection, then a new {@link MemoryConfiguration} will be created to
* hold the new default value. * hold the new default value.
* <p> * <p>
* This method will not hold a reference to the specified Configuration, * This method will not hold a reference to the specified Configuration,
* nor will it automatically update if that Configuration ever changes. If * nor will it automatically update if that Configuration ever changes. If
* you require this, you should set the default source with {@link * you require this, you should set the default source with {@link
* #setDefaults(com.boydti.fawe.configuration.Configuration)}. * #setDefaults(Configuration)}.
* *
* @param defaults A configuration holding a list of defaults to copy. * @param defaults A configuration holding a list of defaults to copy.
* @throws IllegalArgumentException Thrown if defaults is null or this. * @throws IllegalArgumentException Thrown if defaults is null or this.
*/ */
void addDefaults(final com.boydti.fawe.configuration.Configuration defaults); void addDefaults(final Configuration defaults);
/** /**
* Sets the source of all default values for this {@link com.boydti.fawe.configuration.Configuration}. * Sets the source of all default values for this {@link Configuration}.
* <p> * <p>
* If a previous source was set, or previous default values were defined, * If a previous source was set, or previous default values were defined,
* then they will not be copied to the new source. * then they will not be copied to the new source.
@ -61,21 +61,21 @@ public interface Configuration extends ConfigurationSection {
* @param defaults New source of default values for this configuration. * @param defaults New source of default values for this configuration.
* @throws IllegalArgumentException Thrown if defaults is null or this. * @throws IllegalArgumentException Thrown if defaults is null or this.
*/ */
void setDefaults(final com.boydti.fawe.configuration.Configuration defaults); void setDefaults(final Configuration defaults);
/** /**
* Gets the source {@link com.boydti.fawe.configuration.Configuration} for this configuration. * Gets the source {@link Configuration} for this configuration.
* <p> * <p>
* If no configuration source was set, but default values were added, then * If no configuration source was set, but default values were added, then
* a {@link com.boydti.fawe.configuration.MemoryConfiguration} will be returned. If no source was set * a {@link MemoryConfiguration} will be returned. If no source was set
* and no defaults were set, then this method will return null. * and no defaults were set, then this method will return null.
* *
* @return Configuration source for default values, or null if none exist. * @return Configuration source for default values, or null if none exist.
*/ */
com.boydti.fawe.configuration.Configuration getDefaults(); Configuration getDefaults();
/** /**
* Gets the {@link com.boydti.fawe.configuration.ConfigurationOptions} for this {@link com.boydti.fawe.configuration.Configuration}. * Gets the {@link ConfigurationOptions} for this {@link Configuration}.
* <p> * <p>
* All setters through this method are chainable. * All setters through this method are chainable.
* *

View File

@ -3,5 +3,5 @@ package com.boydti.fawe.object.brush;
import com.sk89q.worldedit.entity.Player; import com.sk89q.worldedit.entity.Player;
public interface MovableTool { public interface MovableTool {
public boolean move(Player player); boolean move(Player player);
} }

View File

@ -18,12 +18,12 @@ import com.sk89q.worldedit.history.change.Change;
import com.sk89q.worldedit.world.World; import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.biome.BiomeType; import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockTypes; import com.sk89q.worldedit.world.block.BlockTypes;
import java.io.EOFException; import java.io.EOFException;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator; import java.util.Iterator;
import java.util.NoSuchElementException; import java.util.NoSuchElementException;
@ -717,7 +717,7 @@ public abstract class FaweStreamChangeSet extends FaweChangeSet {
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
return new ArrayList<Change>().iterator(); return Collections.emptyIterator();
} }
@Override @Override