Package io.molr.commons.domain
Class ImmutableMissionRepresentation
- java.lang.Object
-
- io.molr.commons.domain.ImmutableMissionRepresentation
-
- All Implemented Interfaces:
MissionRepresentation
public final class ImmutableMissionRepresentation extends java.lang.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 java.util.Set<Block>
allBlocks()
static ImmutableMissionRepresentation.Builder
builder(Block rootBlock)
static ImmutableMissionRepresentation.Builder
builder(MissionRepresentation oldRepresentation)
java.util.List<Block>
childrenOf(Block block)
java.util.Set<Block>
defaultBreakpoints()
Default breakpoints determine the default configuration of breakpoints for each mission instance.static MissionRepresentation
empty(java.lang.String name)
boolean
equals(java.lang.Object o)
int
hashCode()
boolean
isLeaf(Block block)
java.util.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 java.util.List<Block> childrenOf(Block block)
- Specified by:
childrenOf
in interfaceMissionRepresentation
-
allBlocks
public java.util.Set<Block> allBlocks()
- Specified by:
allBlocks
in interfaceMissionRepresentation
-
isLeaf
public boolean isLeaf(Block block)
- Specified by:
isLeaf
in interfaceMissionRepresentation
-
parentOf
public java.util.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
-
defaultBreakpoints
public java.util.Set<Block> defaultBreakpoints()
Description copied from interface:MissionRepresentation
Default breakpoints determine the default configuration of breakpoints for each mission instance.- Specified by:
defaultBreakpoints
in interfaceMissionRepresentation
- Returns:
- immutable set of blocks that represent default breakpoints
-
builder
public static ImmutableMissionRepresentation.Builder builder(Block rootBlock)
-
builder
public static ImmutableMissionRepresentation.Builder builder(MissionRepresentation oldRepresentation)
-
empty
public static MissionRepresentation empty(java.lang.String name)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-