Package net.sf.freecol.common.networking
Class ChangeSet.See
- java.lang.Object
-
- net.sf.freecol.common.networking.ChangeSet.See
-
- Enclosing class:
- ChangeSet
public static class ChangeSet.See extends java.lang.Object
Class to control the visibility of a change.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
See(int type)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ChangeSet.See
all()
Make this change visible to all players.ChangeSet.See
always(Player player)
Make this change visible to the given player.ChangeSet.SeeCheck
check(Player player)
Check this visibility with respect to a player.ChangeSet.See
except(Player player)
Make this change invisible to the given player.static ChangeSet.See
only(Player player)
Make this change visible only to the given player.static ChangeSet.See
perhaps()
Make this change visible to all players, provided they can see the objects that are being changed.ChangeSet.See
perhapsOnly(Player player)
Make this change visible to the given player, provided the player can see the objects being changed.java.lang.String
toString()
-
-
-
Field Detail
-
ALL
private static final int ALL
- See Also:
- Constant Field Values
-
PERHAPS
private static final int PERHAPS
- See Also:
- Constant Field Values
-
ONLY
private static final int ONLY
- See Also:
- Constant Field Values
-
seeAlways
private Player seeAlways
-
seePerhaps
private Player seePerhaps
-
seeNever
private Player seeNever
-
type
private final int type
-
-
Method Detail
-
check
public ChangeSet.SeeCheck check(Player player)
Check this visibility with respect to a player.- Parameters:
player
- ThePlayer
to consider.- Returns:
- If the player satisfies the visibility test return VISIBLE, or INVISIBLE on failure, or SPECIAL if indeterminate.
-
all
public static ChangeSet.See all()
Make this change visible to all players.- Returns:
- See(ALL).
-
perhaps
public static ChangeSet.See perhaps()
Make this change visible to all players, provided they can see the objects that are being changed.- Returns:
- See(PERHAPS).
-
only
public static ChangeSet.See only(Player player)
Make this change visible only to the given player.- Parameters:
player
- ThePlayer
to see this change.- Returns:
- A
See
(ONLY) with attached player.
-
always
public ChangeSet.See always(Player player)
Make this change visible to the given player.- Parameters:
player
- ThePlayer
to see this change.- Returns:
- A
See
with attached player.
-
perhapsOnly
public ChangeSet.See perhapsOnly(Player player)
Make this change visible to the given player, provided the player can see the objects being changed.- Parameters:
player
- ThePlayer
to perhaps see this change.- Returns:
- A
See
with attached player.
-
except
public ChangeSet.See except(Player player)
Make this change invisible to the given player.- Parameters:
player
- ThePlayer
that can not see this change.- Returns:
- A
See
with attached player.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-