-
Notifications
You must be signed in to change notification settings - Fork 0
Manipulators
Jamie Mansfield edited this page Nov 2, 2015
·
15 revisions
The following page will try to explain what a manipulator is and how to use them.
A Manipulator is a standalone object, that can be manipulated. It is used for holding meta.
import uk.jamierocks.meta.api.manipulator.MetaManipulator;
public class ExampleMeta implements MetaManipulator {
int time();
}
The above example has one value - time. The value can be manipulated by using the value functions provided.
meta.offer(Keys.TIME, 5);
The manipulator will now have time down as being 5, however this does NOT mean the holder will have been changed. To change the MetaHolder you will have to apply the manipulator to it.
holder.applyMeta(meta);