Package ora4mas.nopl.oe
Class CollectiveOE
- java.lang.Object
-
- ora4mas.nopl.oe.CollectiveOE
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<CollectiveOE>
,npl.DynamicFactsProvider
public abstract class CollectiveOE extends java.lang.Object implements java.io.Serializable, npl.DynamicFactsProvider, java.lang.Comparable<CollectiveOE>
Represents a collective entity (groups and schemes)- Author:
- Jomi Fred Hubner
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Set<Player>
exPlayers
protected java.util.Set<jason.asSyntax.Literal>
exPlayersAsLiteralList
protected java.lang.String
id
protected java.util.Set<Player>
players
protected java.util.Set<jason.asSyntax.Literal>
playersAsLiteralList
protected jason.asSyntax.Term
termId
-
Constructor Summary
Constructors Constructor Description CollectiveOE(java.lang.String id)
-
Method Summary
Modifier and Type Method Description Player
addPlayer(java.lang.String ag, java.lang.String obj)
void
clearExPlayers()
void
clearPlayers()
abstract CollectiveOE
clone()
int
compareTo(CollectiveOE g)
java.util.Iterator<jason.asSemantics.Unifier>
consult(jason.asSyntax.Literal l, jason.asSemantics.Unifier u)
boolean
equals(java.lang.Object obj)
protected static jaca.ToProlog
getCollectionAsProlog(java.util.Collection<? extends java.lang.Object> c)
abstract jason.asSyntax.Literal[]
getDynamicFacts()
private jason.asSyntax.Literal
getExPlayerLiteral(Player p)
(package private) abstract jason.asSyntax.PredicateIndicator
getExPlayerPI()
java.util.Collection<Player>
getExPlayers()
java.lang.String
getId()
private jason.asSyntax.Literal
getPlayerLiteral(Player p)
(package private) abstract jason.asSyntax.PredicateIndicator
getPlayerPI()
java.util.Collection<Player>
getPlayers()
int
hashCode()
boolean
hasPlayer(java.lang.String ag, java.lang.String obj)
boolean
isRelevant(jason.asSyntax.PredicateIndicator pi)
boolean
removePlayer(java.lang.String ag, java.lang.String obj)
java.lang.String
toString()
java.util.List<jason.asSyntax.Literal>
transform()
transforms a Scheme Instance into NPL code (dynamic facts)
-
-
-
Field Detail
-
id
protected final java.lang.String id
-
termId
protected final jason.asSyntax.Term termId
-
players
protected java.util.Set<Player> players
-
exPlayers
protected java.util.Set<Player> exPlayers
-
playersAsLiteralList
protected java.util.Set<jason.asSyntax.Literal> playersAsLiteralList
-
exPlayersAsLiteralList
protected java.util.Set<jason.asSyntax.Literal> exPlayersAsLiteralList
-
-
Method Detail
-
getId
public java.lang.String getId()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getPlayerPI
abstract jason.asSyntax.PredicateIndicator getPlayerPI()
-
getExPlayerPI
abstract jason.asSyntax.PredicateIndicator getExPlayerPI()
-
addPlayer
public Player addPlayer(java.lang.String ag, java.lang.String obj)
-
hasPlayer
public boolean hasPlayer(java.lang.String ag, java.lang.String obj)
-
removePlayer
public boolean removePlayer(java.lang.String ag, java.lang.String obj)
-
clearPlayers
public void clearPlayers()
-
clearExPlayers
public void clearExPlayers()
-
getPlayerLiteral
private jason.asSyntax.Literal getPlayerLiteral(Player p)
-
getExPlayerLiteral
private jason.asSyntax.Literal getExPlayerLiteral(Player p)
-
getPlayers
public java.util.Collection<Player> getPlayers()
-
getExPlayers
public java.util.Collection<Player> getExPlayers()
-
clone
public abstract CollectiveOE clone()
- Overrides:
clone
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getCollectionAsProlog
protected static jaca.ToProlog getCollectionAsProlog(java.util.Collection<? extends java.lang.Object> c)
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
compareTo
public int compareTo(CollectiveOE g)
- Specified by:
compareTo
in interfacejava.lang.Comparable<CollectiveOE>
-
transform
public java.util.List<jason.asSyntax.Literal> transform()
transforms a Scheme Instance into NPL code (dynamic facts)
-
getDynamicFacts
public abstract jason.asSyntax.Literal[] getDynamicFacts()
-
isRelevant
public boolean isRelevant(jason.asSyntax.PredicateIndicator pi)
- Specified by:
isRelevant
in interfacenpl.DynamicFactsProvider
-
consult
public java.util.Iterator<jason.asSemantics.Unifier> consult(jason.asSyntax.Literal l, jason.asSemantics.Unifier u)
- Specified by:
consult
in interfacenpl.DynamicFactsProvider
-
-