@Override public TB perform(TB value) { Tensor<V> internalTensor = new ElementUnaryOperation<V>(elementOperation).perform(value.tensor()); /* safe cast since we ensure C as a type in the argument! */ @SuppressWarnings("unchecked") Class<TB> tensorBackedClass = (Class<TB>) value.getClass(); return TensorbackedInternals.createBackedByTensor(tensorBackedClass, internalTensor); }
public boolean equals(Object o) { if (this == o) return true; else if (o == null || !o.getClass().equals(Pair.class)) return false; else { final Pair<Object, Object> that = (Pair<Object, Object>) o; if (first != null ? !first.equals(that.first) : that.first != null) return false; else return !(second != null ? !second.equals(that.second) : that.second != null); } }
static ByteMultiple parseString(String sMultiple) { if (sMultiple == null || sMultiple.isEmpty()) // MB by default return MB; String sMU = sMultiple.toUpperCase(); if (B.name().toUpperCase().endsWith(sMU)) return B; if (KB.name().toUpperCase().endsWith(sMU)) return KB; if (MB.name().toUpperCase().endsWith(sMU)) return MB; if (GB.name().toUpperCase().endsWith(sMU)) return GB; if (TB.name().toUpperCase().endsWith(sMU)) return TB; throw new IllegalArgumentException("Unsupported ByteMultiple " + sMultiple); }
public enum T implements IEnumFld { // @formatter:off PKEY(TB.crtIntPkey()), // 主键 TITLE(TB.crtStr("title", "标题", 64)), // 标题 IMAGE_URL(SYS.PHOTO__NULL, "封面"), // 大图片建议尺寸为900*500,小图片建议尺寸为200*200 SHOW_COVER_PIC(SYS.YN, "是否显示封面"), AUTHOR(SYS.STR__8_NULL, "作者"), SUMMARY(TB.crtStr("summary", "摘要", 120, true)), CONTENT(TB.crtText("content", "正文", 65535, true)), REL_URL(SYS.STR__200_NULL, "原文链接"), TYPE(Tb.crt(Wm.ONewsType.DEFAULT)), // 图文类型 EXP(Tb.crtLongTbObj("exp", "扩展链接").setNull()), URL(SYS.STR__200_NULL, "自定义链接"), PIC_UP(WmNews.class, "上级图文", true), SORT(SYS.SORT__INT), MEDIA_ID(SYS.STR__100_NULL, "图文ID"), STATUS(Tb.crt(Wx.OSyncStatus.DEFAULT).setNull()), CMB_WX(CmbWx.fldFlds()), // >>>以下是自动产生的源代码行--内嵌字段定义--请保留此行用于识别>>> ACCOUNT(TB.get("account")), // 公众帐号 ROW_VERSION(TB.get("rowVersion")), // 版本 // <<<以上是自动产生的源代码行--内嵌字段定义--请保留此行用于识别<<< ; // >>>以下是自动产生的源代码行--自动建立的索引定义--请保留此行用于识别>>> // <<<以上是自动产生的源代码行--自动建立的索引定义--请保留此行用于识别<<< // 索引 private Fld _fld; private T(Class clazz, String name, boolean... isnull) { _fld = TB.addOutKey(clazz, this, name, isnull); } private T(IEnumFld fld, boolean... isnull) { this(fld, null, isnull); } private T(IEnumFld fld, String name, boolean... null1) { _fld = TB.add(fld, this, name, null1); } private T(IEnumFld fld, String name, int strLen) { _fld = TB.add(fld, this, name, strLen); } private T(Fld fld) { _fld = TB.add(fld, this); } public Fld getFld() { return _fld; } }
private T(Fld fld) { _fld = TB.add(fld, this); }
private T(IEnumFld fld, String name, int strLen) { _fld = TB.add(fld, this, name, strLen); }
private T(IEnumFld fld, String name, boolean... null1) { _fld = TB.add(fld, this, name, null1); }
private T(Class clazz, String name, boolean... isnull) { _fld = TB.addOutKey(clazz, this, name, isnull); }
public enum T implements IEnumFld { // @formatter:off PKEY(TB.crtIntPkey()), // 主键 STATUS(TB.crt(Wx.OStatus.DEFAULT)), OPEN_ID(SYS.STR__100, "粉丝ID"), UNION_ID(SYS.STR__100_NULL, "唯一ID"), NICKNAME(SYS.STR__200_NULL, "昵称"), SEX(SYS.SEX, true), CITY(SYS.STR__100_NULL, "城市"), PROVINCE(SYS.STR__100_NULL, "省份"), COUNTRY(SYS.STR__100_NULL, "国家"), IMAGE_URL(SYS.PHOTO__NULL, "头像"), REM(SYS.STR__200_NULL, "备注"), USER_GROUP(WxUserGroup.fldOutKey()), SUBSCRIBE_TIME(SYS.TIME__NULL, "关注时间"), INVITED1(WxUser.fldOutKey("invited1", "一级邀请人").setNull()), INVITED2(WxUser.fldOutKey("invited2", "二级邀请人").setNull()), IS_MEMBER(SYS.NY, "是否会员"), QRCODE(SYS.PHOTO__NULL, "专属二维码"), QRCODE_EXPIRE_TIME(SYS.TIME__NULL, "二维码到期时间"), HISTORY_COMMISSION(SYS.AMT, "历史佣金"), CASHABLE_COMMISSION(SYS.AMT, "可提现佣金"), ACCOUNT(WxAccount.fldOutKey()), // 公众账号 SYNC_TIME(SYS.TIME__NULL, "同步时间"), SYNC_STATUS(SYS.YN, "是否同步"), ROW_VERSION(SYS.ROW_VERSION), // >>>以下是自动产生的源代码行--内嵌字段定义--请保留此行用于识别>>> // <<<以上是自动产生的源代码行--内嵌字段定义--请保留此行用于识别<<< ; // >>>以下是自动产生的源代码行--自动建立的索引定义--请保留此行用于识别>>> // <<<以上是自动产生的源代码行--自动建立的索引定义--请保留此行用于识别<<< // 索引 public static final Index IDX_INVITED1_ACCOUNT = TB.addIndex("invited1Account", false, T.INVITED1, T.ACCOUNT); public static final Index IDX_INVITED2_ACCOUNT = TB.addIndex("invited2Account", false, T.INVITED2, T.ACCOUNT); public static final Index IDX_OPEN_ID_ACCOUNT = TB.addIndex("openIdAccount", true, T.OPEN_ID, T.ACCOUNT); public static final Index IDX_UNION_ID_ACCOUNT = TB.addIndex("unionIdAccount", true, T.UNION_ID, T.ACCOUNT); public static final Index IDX_NICKNAME_ACCOUNT = TB.addIndex("nicknameAccount", false, T.NICKNAME, T.ACCOUNT); public static final Index IDX_REM_ACCOUNT = TB.addIndex("remAccount", false, T.REM, T.ACCOUNT); public static final Index IDX_ACCOUNT = TB.addIndex("account", false, T.ACCOUNT); private Fld _fld; private T(Class clazz, String name, boolean... isnull) { _fld = TB.addOutKey(clazz, this, name, isnull); } private T(IEnumFld fld, boolean... isnull) { this(fld, null, isnull); } private T(IEnumFld fld, String name, boolean... null1) { _fld = TB.add(fld, this, name, null1); } private T(IEnumFld fld, String name, int strLen) { _fld = TB.add(fld, this, name, strLen); } private T(Fld fld) { _fld = TB.add(fld, this); } public Fld getFld() { return _fld; } }
public int hashCode() { int result; result = (first != null ? first.hashCode() : -1); result = 73 * result + (second != null ? second.hashCode() : -1); return result; }