/** * Copyright (C) 2009 - present by OpenGamma Inc. and the OpenGamma group of companies * * Please see distribution for license. */ package com.opengamma.financial.security.option; import java.util.Map; import org.joda.beans.BeanBuilder; import org.joda.beans.BeanDefinition; import org.joda.beans.JodaBeanUtils; import org.joda.beans.MetaProperty; import org.joda.beans.impl.direct.DirectBeanBuilder; import org.joda.beans.impl.direct.DirectMetaPropertyMap; /** * The asset or nothing payoff style. */ @BeanDefinition public class AssetOrNothingPayoffStyle extends PayoffStyle { /** Serialization version. */ private static final long serialVersionUID = 1L; /** * Creates an instance. */ public AssetOrNothingPayoffStyle() { } //------------------------------------------------------------------------- @Override public <T> T accept(PayoffStyleVisitor<T> visitor) { return visitor.visitAssetOrNothingPayoffStyle(this); } //------------------------- AUTOGENERATED START ------------------------- ///CLOVER:OFF /** * The meta-bean for {@code AssetOrNothingPayoffStyle}. * @return the meta-bean, not null */ public static AssetOrNothingPayoffStyle.Meta meta() { return AssetOrNothingPayoffStyle.Meta.INSTANCE; } static { JodaBeanUtils.registerMetaBean(AssetOrNothingPayoffStyle.Meta.INSTANCE); } @Override public AssetOrNothingPayoffStyle.Meta metaBean() { return AssetOrNothingPayoffStyle.Meta.INSTANCE; } //----------------------------------------------------------------------- @Override public AssetOrNothingPayoffStyle clone() { return JodaBeanUtils.cloneAlways(this); } @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj != null && obj.getClass() == this.getClass()) { return super.equals(obj); } return false; } @Override public int hashCode() { int hash = 7; return hash ^ super.hashCode(); } @Override public String toString() { StringBuilder buf = new StringBuilder(32); buf.append("AssetOrNothingPayoffStyle{"); int len = buf.length(); toString(buf); if (buf.length() > len) { buf.setLength(buf.length() - 2); } buf.append('}'); return buf.toString(); } @Override protected void toString(StringBuilder buf) { super.toString(buf); } //----------------------------------------------------------------------- /** * The meta-bean for {@code AssetOrNothingPayoffStyle}. */ public static class Meta extends PayoffStyle.Meta { /** * The singleton instance of the meta-bean. */ static final Meta INSTANCE = new Meta(); /** * The meta-properties. */ private final Map<String, MetaProperty<?>> _metaPropertyMap$ = new DirectMetaPropertyMap( this, (DirectMetaPropertyMap) super.metaPropertyMap()); /** * Restricted constructor. */ protected Meta() { } @Override public BeanBuilder<? extends AssetOrNothingPayoffStyle> builder() { return new DirectBeanBuilder<AssetOrNothingPayoffStyle>(new AssetOrNothingPayoffStyle()); } @Override public Class<? extends AssetOrNothingPayoffStyle> beanType() { return AssetOrNothingPayoffStyle.class; } @Override public Map<String, MetaProperty<?>> metaPropertyMap() { return _metaPropertyMap$; } //----------------------------------------------------------------------- } ///CLOVER:ON //-------------------------- AUTOGENERATED END -------------------------- }