Class StateImageObject
java.lang.Object
io.github.jspinak.brobot.database.state.stateObject.stateImageObject.StateImageObject
- All Implemented Interfaces:
StateObject
public class StateImageObject extends java.lang.Object implements StateObject
StateImageObject represents an Image that exists in the owner State. Unless
it has a shared Image, this StateImageObject is representative of the State and will be
used to find it in case Brobot is lost. All StateImageObjects, including those with shared
Images, are used to find a State during StateTransitions and with Find Actions.
StateImageObjects can have either an Image or a RegionImagePairs. RegionImagePairs are for
Images with fixed locations and are specified by the 'isFixed' option in the Builder.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StateImageObject.Builder
-
Method Summary
Modifier and Type Method Description void
addAnchor(Position.Name definedRegionBorder, Position positionInMatch)
void
addAnchor(Position.Name definedRegionBorder, Position.Name positionInMatch)
void
addSearchRegions(java.util.List<Region> regions)
void
addSnapshot(MatchSnapshot matchSnapshot)
void
addTimesActedOn()
ObjectCollection
asObjectCollection()
boolean
defined()
java.util.List<Region>
getAllSearchRegions()
AttributeData
getAttributeData(AttributeTypes.Attribute attribute)
java.util.Optional<Region>
getDefinedRegion()
Region
getSearchRegion()
void
setProbabilityToBaseProbability()
void
setSearchRegion(Region region)
void
setSearchRegionsObject(java.util.List<Region> regions)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.github.jspinak.brobot.database.state.stateObject.StateObject
getAnchors, getMatchHistory, getName, getOwnerStateName, getPosition, getTimesActedOn, setProbabilityExists, setTimesActedOn
-
Method Details
-
getSearchRegion
-
setSearchRegion
-
getAllSearchRegions
-
setSearchRegionsObject
-
addSearchRegions
-
defined
public boolean defined() -
getDefinedRegion
-
setProbabilityToBaseProbability
public void setProbabilityToBaseProbability() -
addAnchor
-
addAnchor
-
asObjectCollection
-
addTimesActedOn
public void addTimesActedOn()- Specified by:
addTimesActedOn
in interfaceStateObject
-
addSnapshot
- Specified by:
addSnapshot
in interfaceStateObject
-
getAttributeData
-