Class SignedAsset
java.lang.Object
edu.uky.cs.nil.tt.world.Asset
edu.uky.cs.nil.tt.world.SignedAsset
A signed asset is an
asset which has a unique signature among all other assets of that type in a story
world. A signed asset's name is equivalent to the
result of its signature's toString() method.- Author:
- Stephen G. Ware
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSignedAsset(int id, Signature signature, String description) Constructs a new signed asset. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract SignedAssetsetSignature(Signature signature) Returns a new signed asset that is the same as this asset, except that its signature and name are the given value.abstract SignedAssetsubstitute(Function<Object, Object> substitution) Returns a logical object identical to this one, except that its logical elements have been replaced according to the given substitution.Methods inherited from class Asset
equals, getDescription, getID, getName, hashCode, setDescription, setID, toString
-
Field Details
-
signature
The asset's unique signature
-
-
Constructor Details
-
SignedAsset
-
-
Method Details
-
setSignature
Returns a new signed asset that is the same as this asset, except that its signature and name are the given value.- Parameters:
signature- the signature and name the new asset should have- Returns:
- a signed asset identical to this asset, except with the given signature and name
-
substitute
Description copied from interface:LogicalReturns a logical object identical to this one, except that its logical elements have been replaced according to the given substitution. A substitution defines how some logical formula (the input to the function) should be replaced with a different formula (the output of the function).- Specified by:
substitutein interfaceLogical- Specified by:
substitutein classAsset- Parameters:
substitution- a function which maps logical formula that should be replaced to the formula they should be replaced with- Returns:
- an identical object, except that its logical formula have been replaced according to the substitution
-