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


Java NotNull类代码示例

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


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

示例1: getRedListSheetsIsCollaborator

import com.sun.istack.NotNull; //导入依赖的package包/类
@Override
public Iterator<TaxEnt> getRedListSheetsIsCollaborator(INodeKey userId, String territory, @NotNull TypeOfCollaboration typeOfCollaboration) throws DatabaseException {
    Map<String, Object> bindVars = new HashMap<>();
    bindVars.put("user", userId.toString());
    bindVars.put("@redlistcollection", "redlist_" + territory);
    if(typeOfCollaboration == null) return Collections.emptyIterator();
    try {
        switch (typeOfCollaboration) {
            case TEXTAUTHOR:
                return database.query(AQLOccurrenceQueries.getString("reportquery.1"), bindVars, null, TaxEnt.class);

            case ASSESSOR:
                return database.query(AQLOccurrenceQueries.getString("reportquery.1a"), bindVars, null, TaxEnt.class);

            case REVIEWER:
                return database.query(AQLOccurrenceQueries.getString("reportquery.1b"), bindVars, null, TaxEnt.class);

            default: return Collections.emptyIterator();
        }
    } catch (ArangoDBException e) {
        throw new DatabaseException(e.getMessage());
    }
}
 
开发者ID:miguel-porto,项目名称:flora-on-server,代码行数:24,代码来源:OccurrenceReportArangoDriver.java

示例2: compareTo

import com.sun.istack.NotNull; //导入依赖的package包/类
@Override
public int compareTo(@NotNull T arg0) {
    if (arg0 == null) {
        throw new NullPointerException("Unknown comparison");
    }

    Variable<?> var = (Variable<?>) arg0;
    if (id < var.id) {
        return BEFORE;
    } else if (id == var.id) {
        return EQUAL;
    } else if (id > var.id) {
        return AFTER;
    } else {
        log.error("Unknown comparison");
        return EQUAL;
    }
}
 
开发者ID:canhnt,项目名称:sne-xacml,代码行数:19,代码来源:Variable.java

示例3: configure

import com.sun.istack.NotNull; //导入依赖的package包/类
void configure(
    @NotNull final Project project,
    @NotNull final List<HybrisModuleDescriptor> allModules
);
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:5,代码来源:LoadedConfigurator.java

示例4: getDrugs

import com.sun.istack.NotNull; //导入依赖的package包/类
public List<Drug> getDrugs(@NotNull LoggedInInfo info, @NotNull int demographicNo, @NotNull String status)
        throws UnsupportedOperationException {
    if (status.equals(RxManager.ALL)) return this.getAllDrugs(info, demographicNo);
    else if (status.equals(RxManager.CURRENT)) return this.getCurrentDrugs(info, demographicNo);
    else if (status.equals(RxManager.ARCHIVED)) return this.getArchivedDrugs(info, demographicNo);
    else return null;

}
 
开发者ID:williamgrosset,项目名称:OSCAR-ConCert,代码行数:9,代码来源:MockRxManager.java

示例5: marshalAsKmz

import com.sun.istack.NotNull; //导入依赖的package包/类
public boolean marshalAsKmz(
    @NotNull
    String name, Kml... additionalFiles)
    throws IOException
{
    ZipOutputStream out = new ZipOutputStream(new FileOutputStream(name));
    out.setComment("KMZ-file created with Java API for KML. Visit us: http://code.google.com/p/javaapiforkml/");
    this.addKmzFile(this, out, true);
    for (Kml kml: additionalFiles) {
        this.addKmzFile(kml, out, false);
    }
    out.close();
    missingNameCounter = 1;
    return false;
}
 
开发者ID:micromata,项目名称:javaapiforkml,代码行数:16,代码来源:Kml.java

示例6: unmarshalFromKmz

import com.sun.istack.NotNull; //导入依赖的package包/类
/**
 * KMZ to Java
 * Similar to the other unmarshal methods
 * 
 * with the exception that it transforms a KMZ-file into a graph of Java objects. 
 * 
 * 
 */
public static Kml[] unmarshalFromKmz(
    @NotNull
    File file)
    throws IOException
{
    Kml[] EMPTY_KML_ARRAY = (new Kml[0]);
    if (!file.getName().endsWith(".kmz")) {
        return EMPTY_KML_ARRAY;
    }
    ZipFile zip = new ZipFile(file);
    Enumeration<? extends ZipEntry> entries = zip.entries();
    if (!file.exists()) {
        return EMPTY_KML_ARRAY;
    }
    ArrayList<Kml> kmlfiles = new ArrayList<Kml>();
    while (entries.hasMoreElements()) {
        ZipEntry entry = ((ZipEntry) entries.nextElement());
        if (entry.getName().contains("__MACOSX")||entry.getName().contains(".DS_STORE")) {
            continue;
        }
        String entryName = URLDecoder.decode(entry.getName(), "UTF-8");
        if (!entryName.endsWith(".kml")) {
            continue;
        }
        InputStream in = zip.getInputStream(entry);
        Kml unmarshal = Kml.unmarshal(in);
        kmlfiles.add(unmarshal);
    }
    zip.close();
    return kmlfiles.toArray(EMPTY_KML_ARRAY);
}
 
开发者ID:micromata,项目名称:javaapiforkml,代码行数:40,代码来源:Kml.java

示例7: getOptions

import com.sun.istack.NotNull; //导入依赖的package包/类
@NotNull
public Options getOptions() {
    return opts;
}
 
开发者ID:maxep,项目名称:max-ws,代码行数:5,代码来源:SchemaCompilerEx.java

示例8: getPessoaVO

import com.sun.istack.NotNull; //导入依赖的package包/类
@NotNull
@Navigable(alias = "pes")
public PessoaVO getPessoaVO() {
	return pessoaVO;
}
 
开发者ID:darciopacifico,项目名称:omr,代码行数:6,代码来源:ParticipationVO.java


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