net.sf.magicproject.token
Enum Visibility

java.lang.Object
  extended by java.lang.Enum<Visibility>
      extended by net.sf.magicproject.token.Visibility
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Visibility>

public enum Visibility
extends java.lang.Enum<Visibility>

Since:
0.90
Author:
Fabrice Daugan

Enum Constant Summary
HIDDEN
           
PRIVATE
           
PUBLIC
           
 
Method Summary
 Visibility decreaseFor(Player player)
          Return the decreased visibility for this player
 Visibility decreaseFor(Player controller, VisibilityChange visibilityChange)
          Return the increased visibility for this player
 Visibility increaseFor(Player player)
          Return the increased visibility for this player
 Visibility increaseFor(Player controller, VisibilityChange visibilityChange)
          Return the increased visibility for this player
 boolean isVisibleFor(Player player)
          Is the card is visible for the specified player.
 boolean isVisibleForOpponent()
          Is the card is visible for the specified player.
 boolean isVisibleForYou()
          Is the card is visible for the specified player.
static Visibility valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Visibility[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

PUBLIC

public static final Visibility PUBLIC

PRIVATE

public static final Visibility PRIVATE

HIDDEN

public static final Visibility HIDDEN
Method Detail

values

public static Visibility[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Visibility c : Visibility.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Visibility valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

isVisibleFor

public final boolean isVisibleFor(Player player)
Is the card is visible for the specified player.

Parameters:
player - the player looking this card.
Returns:
true if the card is visible for the specified player.

isVisibleForYou

public boolean isVisibleForYou()
Is the card is visible for the specified player.

Returns:
true if the card is visible for you.

isVisibleForOpponent

public boolean isVisibleForOpponent()
Is the card is visible for the specified player.

Returns:
true if the card is visible for you.

increaseFor

public Visibility increaseFor(Player player)
Return the increased visibility for this player

Parameters:
player - is the player whom the visibility is granted.
Returns:
the increased visibility for this player

increaseFor

public Visibility increaseFor(Player controller,
                              VisibilityChange visibilityChange)
Return the increased visibility for this player

Parameters:
controller - The controller of component to modify.
visibilityChange - The visibility change.
Returns:
the increased visibility for this player

decreaseFor

public Visibility decreaseFor(Player player)
Return the decreased visibility for this player

Parameters:
player - is the player whom the visibility is removed.
Returns:
the decreased visibility for this player

decreaseFor

public Visibility decreaseFor(Player controller,
                              VisibilityChange visibilityChange)
Return the increased visibility for this player

Parameters:
controller - The controller of component to modify.
visibilityChange - The visibility change.
Returns:
the increased visibility for this player


Copyright © 2003-2007 Magic-Project. All Rights Reserved.