mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
fix javadoc comments
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package forge;
|
||||
|
||||
|
||||
import com.google.code.jyield.Generator;
|
||||
import com.google.code.jyield.Yieldable;
|
||||
import forge.card.cardFactory.CardFactoryUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -8,9 +10,6 @@ import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.Iterator;
|
||||
|
||||
import com.google.code.jyield.Generator;
|
||||
import com.google.code.jyield.Yieldable;
|
||||
|
||||
|
||||
/**
|
||||
* <p>CardList class.</p>
|
||||
@@ -606,13 +605,13 @@ public class CardList implements Iterable<Card> {
|
||||
/**
|
||||
* <p>getTargetableCards.</p>
|
||||
*
|
||||
* @param Source a {@link forge.Card} object.
|
||||
* @param source a {@link forge.Card} object.
|
||||
* @return a {@link forge.CardList} object.
|
||||
*/
|
||||
public CardList getTargetableCards(final Card Source) {
|
||||
public CardList getTargetableCards(final Card source) {
|
||||
return this.filter(new CardListFilter() {
|
||||
public boolean addCard(Card c) {
|
||||
return CardFactoryUtil.canTarget(Source, c);
|
||||
return CardFactoryUtil.canTarget(source, c);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -620,7 +619,7 @@ public class CardList implements Iterable<Card> {
|
||||
/**
|
||||
* <p>getUnprotectedCards.</p>
|
||||
*
|
||||
* @param Source a {@link forge.Card} object.
|
||||
* @param source a {@link forge.Card} object.
|
||||
* @return a {@link forge.CardList} object.
|
||||
*/
|
||||
public CardList getUnprotectedCards(final Card source) {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
package forge;
|
||||
|
||||
import com.google.code.jyield.Generator;
|
||||
import com.google.code.jyield.YieldUtils;
|
||||
import forge.card.trigger.TriggerHandler;
|
||||
import forge.error.ErrorViewer;
|
||||
import forge.gui.MultiPhaseProgressMonitorWithETA;
|
||||
import forge.properties.NewConstants;
|
||||
import net.slightlymagic.braids.util.UtilFunctions;
|
||||
import net.slightlymagic.braids.util.generator.FindNonDirectoriesSkipDotDirectoriesGenerator;
|
||||
import net.slightlymagic.braids.util.generator.GeneratorFunctions;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.IOException;
|
||||
import java.io.*;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.Enumeration;
|
||||
import java.util.Locale;
|
||||
@@ -20,15 +20,6 @@ import java.util.regex.Pattern;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipFile;
|
||||
|
||||
import com.google.code.jyield.Generator;
|
||||
import com.google.code.jyield.YieldUtils;
|
||||
|
||||
import net.slightlymagic.braids.util.UtilFunctions;
|
||||
import net.slightlymagic.braids.util.generator.FindNonDirectoriesSkipDotDirectoriesGenerator;
|
||||
import net.slightlymagic.braids.util.generator.GeneratorFunctions;
|
||||
|
||||
import forge.gui.MultiPhaseProgressMonitorWithETA;
|
||||
|
||||
|
||||
/**
|
||||
* <p>CardReader class.</p>
|
||||
@@ -72,7 +63,6 @@ public class CardReader implements Runnable, NewConstants {
|
||||
* @param theMapToFill maps card names to Card instances; this is where we
|
||||
* place the cards once read
|
||||
*
|
||||
* @see CardReader(File,Map,boolean)
|
||||
*/
|
||||
public CardReader(final File theCardsFolder, final Map<String, Card> theMapToFill) {
|
||||
this(theCardsFolder, theMapToFill, true);
|
||||
|
||||
@@ -24,32 +24,30 @@ public class Card_PT {
|
||||
/**
|
||||
* <p>Constructor for Card_PT.</p>
|
||||
*
|
||||
* @param mc a {@link forge.card.mana.ManaCost} object.
|
||||
* @param c a {@link forge.Card} object.
|
||||
* @param addToColors a boolean.
|
||||
* @param baseColor a boolean.
|
||||
* @param newPower a int.
|
||||
* @param newToughness a int.
|
||||
* @param stamp a long.
|
||||
*/
|
||||
Card_PT(int newPower, int newToughness, long stamp) {
|
||||
power = newPower;
|
||||
toughness = newToughness;
|
||||
timeStamp = stamp;
|
||||
power = newPower;
|
||||
toughness = newToughness;
|
||||
timeStamp = stamp;
|
||||
}
|
||||
|
||||
|
||||
public int getPower() {
|
||||
return power;
|
||||
return power;
|
||||
}
|
||||
|
||||
|
||||
public int getToughness() {
|
||||
return toughness;
|
||||
return toughness;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>equals.</p>
|
||||
*
|
||||
* @param cost a {@link java.lang.String} object.
|
||||
* @param c a {@link forge.Card} object.
|
||||
* @param addToColors a boolean.
|
||||
* @param time a long.
|
||||
* @param newPower a int.
|
||||
* @param newToughness a int.
|
||||
* @param stamp a long.
|
||||
* @return a boolean.
|
||||
*/
|
||||
public boolean equals(int newPower, int newToughness, long stamp) {
|
||||
|
||||
@@ -28,12 +28,13 @@ public class Card_Type implements Comparable<Card_Type> {
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>Constructor for Card_PT.</p>
|
||||
*
|
||||
* @param mc a {@link forge.card.mana.ManaCost} object.
|
||||
* @param c a {@link forge.Card} object.
|
||||
* @param addToColors a boolean.
|
||||
* @param baseColor a boolean.
|
||||
* @param types
|
||||
* @param removeSuperType
|
||||
* @param removeCardType
|
||||
* @param removeSubType
|
||||
* @param removeCreatureType
|
||||
* @param stamp
|
||||
*/
|
||||
Card_Type(ArrayList<String> types, boolean removeSuperType, boolean removeCardType, boolean removeSubType,
|
||||
boolean removeCreatureType, long stamp) {
|
||||
|
||||
@@ -173,13 +173,7 @@ public class GameAction {
|
||||
return c;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>changeController.</p>
|
||||
*
|
||||
* @param list a {@link forge.CardList} object.
|
||||
* @param oldController a {@link forge.Player} object.
|
||||
* @param newController a {@link forge.Player} object.
|
||||
*/ /*
|
||||
/*
|
||||
public void changeController(CardList list, Player oldController, Player newController) {
|
||||
if (oldController.equals(newController))
|
||||
return;
|
||||
@@ -210,6 +204,10 @@ public class GameAction {
|
||||
((PlayerZone_ComesIntoPlay) AllZone.getComputerBattlefield()).setTriggers(true);
|
||||
}*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @param c
|
||||
*/
|
||||
public void controllerChange_ZoneCorrection(Card c)
|
||||
{
|
||||
System.out.println("Correcting zone for " + c.toString());
|
||||
|
||||
@@ -21,7 +21,7 @@ public final class Gui_NewGame {
|
||||
*
|
||||
* @param args from the OS or command line
|
||||
*
|
||||
* @deprecated use {@link forge.view.swing.Main.main}
|
||||
* @deprecated use {@link forge.view.swing.Main}
|
||||
*/
|
||||
public static void main(final String[] args) {
|
||||
forge.view.swing.Main.main(args);
|
||||
|
||||
@@ -748,10 +748,9 @@ public abstract class Player extends MyObservable {
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>canTarget.</p>
|
||||
*
|
||||
* @param card a {@link forge.Card} object.
|
||||
* @return a boolean.
|
||||
* @param sa
|
||||
* @return a boolean
|
||||
*/
|
||||
public boolean canTarget(SpellAbility sa) {
|
||||
if (hasKeyword("Shroud") ||
|
||||
@@ -1814,7 +1813,7 @@ public abstract class Player extends MyObservable {
|
||||
* a Player or Planeswalker that this Player must attack if able in an upcoming combat.
|
||||
* This is cleared at the end of each combat.
|
||||
*
|
||||
* @param the Player or Planeswalker (Card) to attack
|
||||
* @param o Player or Planeswalker (Card) to attack
|
||||
*
|
||||
* @since 1.1.01
|
||||
*/
|
||||
|
||||
@@ -1625,13 +1625,13 @@ public class AbilityFactory {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* <p>filterListByType.</p>
|
||||
*
|
||||
* @param list a {@link forge.CardList} object.
|
||||
* @param params a {@link java.util.HashMap} object.
|
||||
* @param sa a {@link forge.card.spellability.SpellAbility} object.
|
||||
* @param list
|
||||
* @param type
|
||||
* @param sa
|
||||
* @return a {@link forge.CardList} object.
|
||||
*/
|
||||
public static CardList filterListByType(CardList list, String type, SpellAbility sa) {
|
||||
|
||||
@@ -114,12 +114,17 @@ public abstract class SpellAbility {
|
||||
* @return a boolean.
|
||||
*/
|
||||
abstract public boolean canPlay();
|
||||
|
||||
/** {@inheritDoc} */
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean canAfford() {
|
||||
Player activator = this.getActivatingPlayer();
|
||||
if (activator == null)
|
||||
if (activator == null) {
|
||||
activator = this.getSourceCard().getController();
|
||||
}
|
||||
|
||||
return ComputerUtil.canPayCost(this, activator);
|
||||
}
|
||||
|
||||
@@ -159,9 +159,7 @@ public class GuiUtils {
|
||||
/**
|
||||
* Like getChoiceOptional, but this takes an Iterator instead of a
|
||||
* variable number of arguments.
|
||||
*
|
||||
* @see #getChoiceOptional(String, T...)
|
||||
* @see #getChoices(String, int, int, Object...)
|
||||
*
|
||||
*
|
||||
* @param message a {@link java.lang.String} object.
|
||||
* @param choices an Iterator over T objects.
|
||||
|
||||
@@ -41,7 +41,7 @@ public class BuildInfo {
|
||||
*
|
||||
* Package access is intentional for unit testing.
|
||||
*
|
||||
* @see FModel.getBuildInfo()
|
||||
* @see forge.model.FModel#getBuildInfo()
|
||||
*/
|
||||
BuildInfo() {
|
||||
// empty
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/** Licensed under both the GPL and the Apache 2.0 License. */
|
||||
package net.slightlymagic.braids.util.generator;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import com.google.code.jyield.Generator;
|
||||
import com.google.code.jyield.Yieldable;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* This is a generator over all of the non-directories residing in a given
|
||||
* starting directory and all subdirectories of it that do NOT start with a
|
||||
* dot; this prevents the code from descending into .svn directories.
|
||||
*
|
||||
* For documentation on Java-Yield and its generators, see
|
||||
* {@link http://code.google.com/p/java-yield/}
|
||||
* {@link com.google.code.jyield.Generator}
|
||||
*/
|
||||
public class FindNonDirectoriesSkipDotDirectoriesGenerator implements Generator<File> {
|
||||
private File startDir;
|
||||
@@ -36,7 +36,7 @@ public class FindNonDirectoriesSkipDotDirectoriesGenerator implements Generator<
|
||||
* <p>Yields results to the given Yieldable. Convert Generator instances to
|
||||
* Iterables with YieldUtils.toIterable.</p>
|
||||
*
|
||||
* See {@link https://java-yield.googlecode.com/hg/docs/com/google/code/jyield/YieldUtils.html#toIterable(com.google.code.jyield.Generator)}
|
||||
* See {@link com.google.code.jyield.YieldUtils#toIterable(com.google.code.jyield.Generator)}
|
||||
*/
|
||||
public void generate(Yieldable<File> yy) {
|
||||
String[] list = startDir.list();
|
||||
|
||||
@@ -8,7 +8,7 @@ import com.google.code.jyield.Yieldable;
|
||||
* substitute for passing around and creating temporary
|
||||
* lists, collections, and arrays.
|
||||
*
|
||||
* @see http://code.google.com/p/jyield/
|
||||
* {@link com.google.code.jyield.Generator}
|
||||
*/
|
||||
public class GeneratorFromArray<T> implements Generator<T> {
|
||||
private T[] array;
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
/** Licensed under both the GPL and the Apache 2.0 License. */
|
||||
package net.slightlymagic.braids.util.generator;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.NoSuchElementException;
|
||||
|
||||
import net.slightlymagic.braids.util.lambda.Lambda1;
|
||||
|
||||
import com.google.code.jyield.Generator;
|
||||
import com.google.code.jyield.YieldUtils;
|
||||
import com.google.code.jyield.Yieldable;
|
||||
import net.slightlymagic.braids.util.lambda.Lambda1;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.NoSuchElementException;
|
||||
|
||||
/**
|
||||
* For documentation on Java-Yield and its generators, see
|
||||
* {@link http://code.google.com/p/java-yield/}
|
||||
* {@link com.google.code.jyield.Generator}.
|
||||
*/
|
||||
public final class GeneratorFunctions {
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* They are licensed under both the GPL and the Apache 2.0 license.
|
||||
*
|
||||
* For documentation on Java-Yield and its generators, see
|
||||
* {@link http://code.google.com/p/java-yield/} .
|
||||
* {@link com.google.code.jyield.Generator}.
|
||||
*/
|
||||
package net.slightlymagic.braids.util.generator;
|
||||
|
||||
|
||||
@@ -3,14 +3,14 @@ package net.slightlymagic.braids.util.progress_monitor;
|
||||
public class StderrProgressMonitor extends BaseProgressMonitor {
|
||||
|
||||
/**
|
||||
* @see BaseProgressMonitor(int,long)
|
||||
* @see net.slightlymagic.braids.util.progress_monitor.BaseProgressMonitor#BaseProgressMonitor(int, long)
|
||||
*/
|
||||
public StderrProgressMonitor(int numPhases, long totalUnitsFirstPhase) {
|
||||
this(numPhases, totalUnitsFirstPhase, 2.0f, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see BaseProgressMonitor(int,long,float)
|
||||
* @see net.slightlymagic.braids.util.progress_monitor.BaseProgressMonitor#BaseProgressMonitor(int, long, float)
|
||||
*/
|
||||
public StderrProgressMonitor(int numPhases, long totalUnitsFirstPhase,
|
||||
float minUpdateIntervalSec)
|
||||
@@ -19,7 +19,7 @@ public class StderrProgressMonitor extends BaseProgressMonitor {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see BaseProgressMonitor(int,long,float,float[])
|
||||
* @see net.slightlymagic.braids.util.progress_monitor.BaseProgressMonitor#BaseProgressMonitor(int, long, float, float[])
|
||||
*/
|
||||
public StderrProgressMonitor(int numPhases, long totalUnitsFirstPhase,
|
||||
float minUpdateIntervalSec, float[] phaseWeights)
|
||||
@@ -29,7 +29,7 @@ public class StderrProgressMonitor extends BaseProgressMonitor {
|
||||
|
||||
@Override
|
||||
/**
|
||||
* @see BaseProgressMonitor#incrementUnitsCompletedThisPhase(long)
|
||||
* @see net.slightlymagic.braids.util.progress_monitor.BaseProgressMonitor#BaseProgressMonitor(int)
|
||||
*/
|
||||
public void incrementUnitsCompletedThisPhase(long numUnits) {
|
||||
super.incrementUnitsCompletedThisPhase(numUnits);
|
||||
|
||||
Reference in New Issue
Block a user