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


Java EList.isEmpty方法代码示例

本文整理汇总了Java中org.eclipse.emf.common.util.EList.isEmpty方法的典型用法代码示例。如果您正苦于以下问题:Java EList.isEmpty方法的具体用法?Java EList.isEmpty怎么用?Java EList.isEmpty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.emf.common.util.EList的用法示例。


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

示例1: addCompositeQuality

import org.eclipse.emf.common.util.EList; //导入方法依赖的package包/类
public static void addCompositeQuality ( final Chart configuration )
{
    final EList<XAxis> x = configuration.getSelectedXAxis ();
    final EList<YAxis> y = configuration.getSelectedYAxis ();

    if ( x.isEmpty () )
    {
        return;
    }

    if ( y.isEmpty () )
    {
        return;
    }

    final CompositeArchiveQualitySeries q = ChartFactory.eINSTANCE.createCompositeArchiveQualitySeries ();
    q.setX ( x.get ( 0 ) );
    q.setY ( y.get ( 0 ) );
    q.setVisible ( true );
    q.setThreshold ( 0.75 );

    configuration.getInputs ().add ( q );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:24,代码来源:Charts.java

示例2: findPossibleConnections

import org.eclipse.emf.common.util.EList; //导入方法依赖的package包/类
/**
 * Find all connections of the give type from master server <q>from</q> to
 * master server <q>to</q>
 */
public static <T extends Connection> List<T> findPossibleConnections ( final EquinoxApplication from, final EquinoxApplication to, final Class<T> clazz )
{
    final List<T> result = new LinkedList<> ();

    for ( final T connection : findConnections ( from, clazz ) )
    {
        for ( final Exporter exporter : to.getExporter () )
        {
            final EList<Endpoint> possibleEndpoints = connection.getPossibleEndpoints ( exporter );
            if ( possibleEndpoints.isEmpty () )
            {
                continue;
            }

            if ( possibleEndpoints.contains ( connection.getEndpoint () ) )
            {
                result.add ( connection );
            }
        }
    }

    return result;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:28,代码来源:Locator.java

示例3: createValueArchive

import org.eclipse.emf.common.util.EList; //导入方法依赖的package包/类
private void createValueArchive ( final ValueArchive archive )
{
    final EList<Item> items = archive.getItems ();
    if ( items.isEmpty () )
    {
        return;
    }

    if ( items.size () == 1 )
    {
        // without proxy
        createArchive ( archive, createSource ( archive, items.get ( 0 ), 0 ) );
    }
    else
    {
        // with proxy
        int i = 1; // start with 1 instead of 0, to make a difference when no proxy is used
        final List<String> sources = new LinkedList<> ();
        for ( final Item item : items )
        {
            sources.add ( createSource ( archive, item, i ) );
            i++;
        }
        createArchive ( archive, createProxy ( archive, sources ) );
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:27,代码来源:ValueArchiveProcessor.java

示例4: processItem

import org.eclipse.emf.common.util.EList; //导入方法依赖的package包/类
private void processItem ( final MasterServer app, final Item item )
{
    if ( item.getInformation () == null )
    {
        return;
    }

    final EList<String> hier = item.getInformation ().getHierarchy ();
    if ( hier.isEmpty () )
    {
        return;
    }

    final SummaryGroup group = getSummaryGroup ( null, app.getSummaryGroups (), new LinkedList<> ( hier ) );
    if ( group == null )
    {
        return;
    }

    group.getItems ().add ( item );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:22,代码来源:SummariesProcessor.java

示例5: createExtractor

import org.eclipse.emf.common.util.EList; //导入方法依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 *
 * @generated NOT
 */
@Override
public Extractor createExtractor ( final CreationContext creationContext )
{
    final EList<String> fields = getFields ();

    if ( fields == null || fields.isEmpty () )
    {
        return new SplitTableExtractor ( getLineSeparatorPattern ().pattern (), getFieldSeparatorPattern ().pattern (), getIdColumn () );
    }
    else
    {
        final String[] headers = getFields ().toArray ( new String[fields.size ()] );
        return new SplitTableExtractor ( getLineSeparatorPattern ().pattern (), getFieldSeparatorPattern ().pattern (), getIdColumn (), headers, Descriptors.createConverter ( this.valueConverter ) );
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:22,代码来源:SplitTableImpl.java

示例6: visitExtendsFacet

import org.eclipse.emf.common.util.EList; //导入方法依赖的package包/类
@Override
public Object visitExtendsFacet(final RAMLParser.ExtendsFacetContext extendsFacet) {
    final String extendsUri = extendsFacet.uri.getText();
    final RamlResource extendsResource = (RamlResource) scope.getResource(extendsUri);
    final EList<org.eclipse.emf.ecore.resource.Resource.Diagnostic> errors = extendsResource.getErrors();
    if (errors.isEmpty()) {
        final EList<EObject> contents = extendsResource.getContents();
        if (contents.size() != 1) {
            scope.addError("Extended api definition is invalid at {0}", extendsFacet);
        } else {
            final EObject extendsEObject = contents.get(0);
            if (extendsEObject instanceof Api && !(extendsEObject instanceof ApiExtension)) {
                scope.setValue(ModulesPackage.Literals.API_EXTENSION__EXTENDS, extendsEObject, extendsFacet.uri);
            } else {
                scope.addError("Extended api definition has invalid type {0} at {1}",
                        extendsEObject.eClass().getName(), extendsFacet);
            }
        }
    } else {
        scope.getResource().getErrors().addAll(errors); // TODO really necessary?
    }
    return super.visitExtendsFacet(extendsFacet);
}
 
开发者ID:vrapio,项目名称:rest-modeling-framework,代码行数:24,代码来源:ExtensionConstructor.java

示例7: linkActivated

import org.eclipse.emf.common.util.EList; //导入方法依赖的package包/类
@Override
public void linkActivated(final HyperlinkEvent event) {
	Session session = ActivityExplorerManager.INSTANCE.getSession();
	RefreshEditorsPrecommitListener repl = session.getRefreshEditorsListener();
	repl.notify(SessionListener.REPRESENTATION_CHANGE);
	repl.notify(SessionListener.SEMANTIC_CHANGE);
	EObject root = ActivityExplorerManager.INSTANCE.getRootSemanticModel();
	if (root instanceof Project) {
		Project rootProject = (Project) root;
		final EList<BehaviorScenario> bsList = rootProject.getDesign().getWorkloadBehavior().getBehavior();
		if (bsList.isEmpty()) {
			final BehaviorScenario bs = GqamFactory.eINSTANCE.createBehaviorScenario();
			final TransactionalEditingDomain domain = TransactionUtil.getEditingDomain(rootProject);
			domain.getCommandStack().execute(new RecordingCommand(domain) {
				public void doExecute() {
					bsList.add(bs);
				}
			});
		}
		linkPressed(event, bsList.get(0), session);
	}
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:23,代码来源:BehaviorScenarioActivity.java

示例8: processTypeParams

import org.eclipse.emf.common.util.EList; //导入方法依赖的package包/类
private void processTypeParams(EList<TypeVariable> typeParams) {
	if (typeParams.isEmpty())
		return;

	// In case of plain-JS output no types will be written
	throw new IllegalStateException("Type reference still left in code. typeParams=" + typeParams);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:8,代码来源:PrettyPrinterSwitch.java

示例9: processTypeArgs

import org.eclipse.emf.common.util.EList; //导入方法依赖的package包/类
private void processTypeArgs(EList<? extends TypeArgument> typeArgs) {
	if (typeArgs.isEmpty())
		return;

	// In case of plain-JS output no types will be written
	throw new IllegalStateException("Type arguments still left in code. typeArgs=" + typeArgs);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:8,代码来源:PrettyPrinterSwitch.java

示例10: getFullMemberRef

import org.eclipse.emf.common.util.EList; //导入方法依赖的package包/类
private FullMemberReference getFullMemberRef(LineTag tag) {
	EList<ContentNode> contents = tag.getValueByKey(LineTagWithFullElementReference.REF)
			.getContents();
	if (!contents.isEmpty()) {
		return (FullMemberReference) contents.get(0);
	}
	return null;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:9,代码来源:N4JSDReader.java

示例11: findScript

import org.eclipse.emf.common.util.EList; //导入方法依赖的package包/类
/** Searches the script node in the given input. */
private Script findScript(Object input) {
	if (input instanceof ResourceSet) {
		ResourceSet rs = (ResourceSet) input;
		if (!rs.getResources().isEmpty()) {
			Resource res = rs.getResources().get(0);
			EList<EObject> contents = res.getContents();
			if (!contents.isEmpty()) {
				Script script = EcoreUtil2.getContainerOfType(contents.get(0), Script.class);
				return script;
			}
		}
	}
	return null;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:16,代码来源:CFGraphProvider.java

示例12: makeCustomizationTags

import org.eclipse.emf.common.util.EList; //导入方法依赖的package包/类
private Collection<String> makeCustomizationTags ( final EList<String> customizationTags )
{
    if ( customizationTags == null || customizationTags.isEmpty () )
    {
        return customizationTags;
    }
    else
    {
        return this.query.getDefaultCustomizationTags ();
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:12,代码来源:QueryComponentGenerator.java

示例13: getOffset

import org.eclipse.emf.common.util.EList; //导入方法依赖的package包/类
public Duration getOffset() {
	final EList<Offset> offsets = task.getEventModel().getOffsets();
	if (offsets.isEmpty()) {
		return NfpFactory.eINSTANCE.createDurationFromString("0ms");
	}
	return offsets.get(0).getValue();
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:8,代码来源:TaskBuilder.java


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