BrightSide Workbench Full Report + Source Code
org.turro.phase.PhaseDefinition Class Reference
Inheritance diagram for org.turro.phase.PhaseDefinition:
Collaboration diagram for org.turro.phase.PhaseDefinition:

Public Member Functions

PhaseDefinition icon (String icon)
 
PhaseDefinition described (String description)
 
PhaseDefinition addMapping (String targetEntity, Integer targetPhase)
 
PhaseDefinition addDocumentation (String documentation)
 
PhaseDefinition addPermission (ConceptPermission permission)
 
int getIndex ()
 
String getName ()
 
Set< PhaseTypegetTypes ()
 
boolean anyStringMatch (Collection< String > types)
 
boolean anyTypeMatch (Collection< PhaseType > types)
 
String getIconName ()
 
String getDescription ()
 
Map< String, Integer > getMapping ()
 
Set< String > getDocumentation ()
 
ConceptPermission getPermission (String name, IElephantEntity iee)
 
Collection< String > getConcepts ()
 
int compareTo (PhaseDefinition o)
 

Static Public Member Functions

static PhaseDefinition create (int index, String name, Set< PhaseType > types)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 36 of file PhaseDefinition.java.

Member Function Documentation

◆ addDocumentation()

PhaseDefinition org.turro.phase.PhaseDefinition.addDocumentation ( String  documentation)

Definition at line 63 of file PhaseDefinition.java.

63  {
64  this.documentation.add(documentation);
65  return this;
66  }

◆ addMapping()

PhaseDefinition org.turro.phase.PhaseDefinition.addMapping ( String  targetEntity,
Integer  targetPhase 
)

Definition at line 58 of file PhaseDefinition.java.

58  {
59  this.mapping.put(targetEntity, targetPhase);
60  return this;
61  }

◆ addPermission()

PhaseDefinition org.turro.phase.PhaseDefinition.addPermission ( ConceptPermission  permission)

Definition at line 68 of file PhaseDefinition.java.

68  {
69  permissions.put(permission);
70  return this;
71  }
ConceptPermission put(String key, ConceptPermission value)
Here is the call graph for this function:

◆ anyStringMatch()

boolean org.turro.phase.PhaseDefinition.anyStringMatch ( Collection< String >  types)

Definition at line 85 of file PhaseDefinition.java.

85  {
86  return anyTypeMatch(types.stream().map(t -> PhaseType.valueOf(t)).toList());
87  }
boolean anyTypeMatch(Collection< PhaseType > types)
Here is the call graph for this function:

◆ anyTypeMatch()

boolean org.turro.phase.PhaseDefinition.anyTypeMatch ( Collection< PhaseType types)

Definition at line 89 of file PhaseDefinition.java.

89  {
90  return this.types.stream().anyMatch(types::contains);
91  }
Here is the caller graph for this function:

◆ compareTo()

int org.turro.phase.PhaseDefinition.compareTo ( PhaseDefinition  o)

Definition at line 120 of file PhaseDefinition.java.

120  {
121  int result = Integer.compare(index, o.index);
122  if(result == 0) {
123  result = CompareUtil.compare(name, o.name);
124  }
125  return result;
126  }

◆ create()

static PhaseDefinition org.turro.phase.PhaseDefinition.create ( int  index,
String  name,
Set< PhaseType types 
)
static

Definition at line 130 of file PhaseDefinition.java.

130  {
131  return new PhaseDefinition(index, name, types);
132  }

◆ described()

PhaseDefinition org.turro.phase.PhaseDefinition.described ( String  description)

Definition at line 53 of file PhaseDefinition.java.

53  {
54  this.description = description;
55  return this;
56  }

◆ getConcepts()

Collection<String> org.turro.phase.PhaseDefinition.getConcepts ( )

Definition at line 113 of file PhaseDefinition.java.

113  {
114  return permissions.concepts();
115  }
Here is the call graph for this function:

◆ getDescription()

String org.turro.phase.PhaseDefinition.getDescription ( )

Definition at line 97 of file PhaseDefinition.java.

97  {
98  return description;
99  }

◆ getDocumentation()

Set<String> org.turro.phase.PhaseDefinition.getDocumentation ( )

Definition at line 105 of file PhaseDefinition.java.

105  {
106  return documentation;
107  }

◆ getIconName()

String org.turro.phase.PhaseDefinition.getIconName ( )

Definition at line 93 of file PhaseDefinition.java.

93  {
94  return icon;
95  }

◆ getIndex()

int org.turro.phase.PhaseDefinition.getIndex ( )

Definition at line 73 of file PhaseDefinition.java.

73  {
74  return index;
75  }
Here is the caller graph for this function:

◆ getMapping()

Map<String, Integer> org.turro.phase.PhaseDefinition.getMapping ( )

Definition at line 101 of file PhaseDefinition.java.

101  {
102  return mapping;
103  }
Here is the caller graph for this function:

◆ getName()

String org.turro.phase.PhaseDefinition.getName ( )

Definition at line 77 of file PhaseDefinition.java.

77  {
78  return name;
79  }
Here is the caller graph for this function:

◆ getPermission()

ConceptPermission org.turro.phase.PhaseDefinition.getPermission ( String  name,
IElephantEntity  iee 
)

Definition at line 109 of file PhaseDefinition.java.

109  {
110  return Optional.ofNullable(permissions.get(name, iee)).orElse(null);
111  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTypes()

Set<PhaseType> org.turro.phase.PhaseDefinition.getTypes ( )

Definition at line 81 of file PhaseDefinition.java.

81  {
82  return types;
83  }

◆ icon()

PhaseDefinition org.turro.phase.PhaseDefinition.icon ( String  icon)

Definition at line 48 of file PhaseDefinition.java.

48  {
49  this.icon = icon;
50  return this;
51  }

The documentation for this class was generated from the following file: