当前位置: 首页>>代码示例>>Java>>正文


Java BasePartial类代码示例

本文整理汇总了Java中org.joda.time.base.BasePartial的典型用法代码示例。如果您正苦于以下问题:Java BasePartial类的具体用法?Java BasePartial怎么用?Java BasePartial使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


BasePartial类属于org.joda.time.base包,在下文中一共展示了BasePartial类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: create

import org.joda.time.base.BasePartial; //导入依赖的package包/类
@Override
public Object create(Object request, SpecimenContext context) {

    if (!(request instanceof SpecimenType)) {
        return new NoSpecimen();
    }

    SpecimenType type = (SpecimenType) request;
    if (!BasePartial.class.isAssignableFrom(type.getRawType())) {
        return new NoSpecimen();
    }

    try {
        Date date = (Date) context.resolve(Date.class);
        long instant = date.getTime();
        return type.getRawType().getDeclaredConstructor(long.class).newInstance(instant);
    } catch (Exception e) {
        e.printStackTrace();
        return new NoSpecimen();
    }
}
 
开发者ID:FlexTradeUKLtd,项目名称:jfixture,代码行数:22,代码来源:BasePartialRelay.java

示例2: getConclusionDate

import org.joda.time.base.BasePartial; //导入依赖的package包/类
@Override
public LocalDate getConclusionDate() {
    final BasePartial date =
            isBolonha() ? (getStudentCurricularPlan().getCycle(getCycleType()) != null ? getStudentCurricularPlan()
                    .getConclusionDate(getCycleType()) : null) : getRegistration().getConclusionDate();
    return date != null ? new LocalDate(date) : null;
}
 
开发者ID:FenixEdu,项目名称:fenixedu-academic,代码行数:8,代码来源:InstitutionPrecedentDegreeInformation.java

示例3: HourMinuteSecond

import org.joda.time.base.BasePartial; //导入依赖的package包/类
/**
 * Constructs a HourMinuteSecond with chronology from this instance and new
 * values.
 * 
 * @param partial
 *            the partial to base this new instance on
 * @param values
 *            the new set of values
 */
public HourMinuteSecond(BasePartial partial, int[] values) {
    super(partial, values);
}
 
开发者ID:FenixEdu,项目名称:fenixedu-academic,代码行数:13,代码来源:HourMinuteSecond.java


注:本文中的org.joda.time.base.BasePartial类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。