Package io.molr.commons.domain
Class ImmutableMissionRepresentation
- java.lang.Object
-
- io.molr.commons.domain.ImmutableMissionRepresentation
-
- All Implemented Interfaces:
MissionRepresentation
public final class ImmutableMissionRepresentation extends Object implements MissionRepresentation
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableMissionRepresentation.Builder
-
Constructor Summary
Constructors Constructor Description ImmutableMissionRepresentation(ImmutableMissionRepresentation.Builder builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<Block>
allBlocks()
com.google.common.collect.ListMultimap<Block,BlockAttribute>
blockAttributes()
Container to augment blocks with one or multiple attributes.static ImmutableMissionRepresentation.Builder
builder(Block rootBlock)
static ImmutableMissionRepresentation.Builder
builder(MissionRepresentation oldRepresentation)
List<Block>
childrenOf(Block block)
static MissionRepresentation
empty(String name)
boolean
equals(Object o)
int
hashCode()
boolean
isLeaf(Block block)
Optional<Block>
parentOf(Block block)
com.google.common.collect.ListMultimap<Block,Block>
parentsToChildren()
Block
rootBlock()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.molr.commons.domain.MissionRepresentation
blockOfId
-
-
-
-
Constructor Detail
-
ImmutableMissionRepresentation
public ImmutableMissionRepresentation(ImmutableMissionRepresentation.Builder builder)
-
-
Method Detail
-
rootBlock
public Block rootBlock()
- Specified by:
rootBlock
in interfaceMissionRepresentation
-
childrenOf
public List<Block> childrenOf(Block block)
- Specified by:
childrenOf
in interfaceMissionRepresentation
-
allBlocks
public Set<Block> allBlocks()
- Specified by:
allBlocks
in interfaceMissionRepresentation
-
isLeaf
public boolean isLeaf(Block block)
- Specified by:
isLeaf
in interfaceMissionRepresentation
-
parentOf
public Optional<Block> parentOf(Block block)
- Specified by:
parentOf
in interfaceMissionRepresentation
-
parentsToChildren
public com.google.common.collect.ListMultimap<Block,Block> parentsToChildren()
- Specified by:
parentsToChildren
in interfaceMissionRepresentation
-
blockAttributes
public com.google.common.collect.ListMultimap<Block,BlockAttribute> blockAttributes()
Description copied from interface:MissionRepresentation
Container to augment blocks with one or multiple attributes.- Specified by:
blockAttributes
in interfaceMissionRepresentation
- Returns:
- attribute lists mapped by blocks
-
builder
public static ImmutableMissionRepresentation.Builder builder(Block rootBlock)
-
builder
public static ImmutableMissionRepresentation.Builder builder(MissionRepresentation oldRepresentation)
-
empty
public static MissionRepresentation empty(String name)
-
-