this.power = new MageInt(1);
this.toughness = new MageInt(2);
// When Stoneforge Mystic enters the battlefield, you may search your library for an Equipment card, reveal it, put it into your hand, then shuffle your library.
TargetCardInLibrary target = new TargetCardInLibrary(1, 1, filter);
this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(target, true, true), true));
// {1}{W}, {T}: You may put an Equipment card from your hand onto the battlefield.
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new StoneforgeMysticEffect(), new ManaCostsImpl("{1}{W}"));
ability.addCost(new TapSourceCost());
this.addAbility(ability);