Examples of Optional

A common alternative to using this class is to find or create a suitable null object for the type in question.

This class is not intended as a direct analogue of any existing "option" or "maybe" construct from other programming environments, though it may bear some similarities. @param < T> the type of instance that can be contained. {@code Optional} is naturallycovariant on this type, so it is safe to cast an {@code Optional} to {@code Optional} for any supertype {@code S} of {@code T}. @author Kurt Alfred Kluever @author Kevin Bourrillion @since Guava release 10

  • com.google.gwt.i18n.client.Messages.Optional
  • com.linkedin.restli.server.annotations.Optional
  • com.sun.star.beans.Optional
  • lupos.engine.operators.multiinput.optional.Optional
  • lupos.gui.operatorgraph.visualeditor.queryeditor.operators.Optional
  • net.sf.laja.parser.engine2.element.Optional
  • org.apache.isis.applib.annotation.Optional
  • org.eclipse.papyrus.sysml.activities.Optional
    A representation of the model object ' Optional'.

    The following features are supported:

    • {@link org.eclipse.papyrus.sysml.activities.Optional#getBase_Parameter Base Parameter}

    @see org.eclipse.papyrus.sysml.activities.ActivitiesPackage#getOptional() @model @generated
  • org.hamcrest.text.pattern.internal.ast.Optional
  • org.jrdf.query.expression.Optional
  • org.supercsv.cellprocessor.Optional
    This processor returns null if it meets the empty String in a column and does not call subsequent processors in its chain. It is a simple customization of the MagicToken. If you need to return different values than null, use that class instead. @author Kasper B. Graversen

  • Examples of com.google.gwt.i18n.client.Messages.Optional

        generateString(logger, template, params, seenFlags, generated);

        // Generate an error if any required parameter was not used somewhere.
        for (int i = 0; i < numParams; ++i) {
          if (!seenFlags[i]) {
            Optional optional = params[i].getAnnotation(Optional.class);
            if (optional == null) {
              throw error(logger, "Required argument " + i + " not present: "
                  + template);
            }
          }
    View Full Code Here

    Examples of com.linkedin.restli.server.annotations.Optional

      {
          if (!paramType.equals(ResourceContext.class))
          {
            throw new ResourceConfigException("Incorrect data type for param: @" + ResourceContextParam.class.getSimpleName() + " parameter annotation must be of type " +  ResourceContext.class.getName());
          }
          Optional optional = annotations.get(Optional.class);
          return new Parameter("",
                               paramType,
                               null,
                               optional != null,
                               null,
    View Full Code Here

    Examples of com.sun.star.beans.Optional

                    new Any(new Type(TypeClass.class), TypeClass.UNSIGNED_LONG)));
            assure(
                UnoRuntime.areSame(
                    new Any(
                        new Type("com.sun.star.beans.Optional<unsigned long>"),
                        new Optional()),
                    new Any(
                        new Type("com.sun.star.beans.Optional<unsigned long>"),
                        new Optional(false, new Integer(0)))));
            assure(!UnoRuntime.areSame(new Test1(), new Test2()));
            Test2 test2 = new Test2();
            assure(
                "Test2",
                UnoRuntime.areSame(
    View Full Code Here

    Examples of com.sun.star.beans.Optional

                    new Any(new Type(TypeClass.class), TypeClass.UNSIGNED_LONG)));
            assure(
                UnoRuntime.areSame(
                    new Any(
                        new Type("com.sun.star.beans.Optional<unsigned long>"),
                        new Optional()),
                    new Any(
                        new Type("com.sun.star.beans.Optional<unsigned long>"),
                        new Optional(false, new Integer(0)))));
            assure(!UnoRuntime.areSame(new Test1(), new Test2()));
            Test2 test2 = new Test2();
            assure(
                "Test2",
                UnoRuntime.areSame(
    View Full Code Here

    Examples of com.sun.star.beans.Optional

                    new Any(new Type(TypeClass.class), TypeClass.UNSIGNED_LONG)));
            assure(
                UnoRuntime.areSame(
                    new Any(
                        new Type("com.sun.star.beans.Optional<unsigned long>"),
                        new Optional()),
                    new Any(
                        new Type("com.sun.star.beans.Optional<unsigned long>"),
                        new Optional(false, new Integer(0)))));
            assure(!UnoRuntime.areSame(new Test1(), new Test2()));
            Test2 test2 = new Test2();
            assure(
                "Test2",
                UnoRuntime.areSame(
    View Full Code Here

    Examples of com.sun.star.beans.Optional

                    new Any(new Type(TypeClass.class), TypeClass.UNSIGNED_LONG)));
            assure(
                UnoRuntime.areSame(
                    new Any(
                        new Type("com.sun.star.beans.Optional<unsigned long>"),
                        new Optional()),
                    new Any(
                        new Type("com.sun.star.beans.Optional<unsigned long>"),
                        new Optional(false, new Integer(0)))));
            assure(!UnoRuntime.areSame(new Test1(), new Test2()));
            Test2 test2 = new Test2();
            assure(
                "Test2",
                UnoRuntime.areSame(
    View Full Code Here

    Examples of com.sun.star.beans.Optional

                    new Any(new Type(TypeClass.class), TypeClass.UNSIGNED_LONG)));
            assure(
                UnoRuntime.areSame(
                    new Any(
                        new Type("com.sun.star.beans.Optional<unsigned long>"),
                        new Optional()),
                    new Any(
                        new Type("com.sun.star.beans.Optional<unsigned long>"),
                        new Optional(false, new Integer(0)))));
            assure(!UnoRuntime.areSame(new Test1(), new Test2()));
            Test2 test2 = new Test2();
            assure(
                "Test2",
                UnoRuntime.areSame(
    View Full Code Here

    Examples of com.sun.star.beans.Optional

                    new Any(new Type(TypeClass.class), TypeClass.UNSIGNED_LONG)));
            assure(
                UnoRuntime.areSame(
                    new Any(
                        new Type("com.sun.star.beans.Optional<unsigned long>"),
                        new Optional()),
                    new Any(
                        new Type("com.sun.star.beans.Optional<unsigned long>"),
                        new Optional(false, new Integer(0)))));
            assure(!UnoRuntime.areSame(new Test1(), new Test2()));
            Test2 test2 = new Test2();
            assure(
                "Test2",
                UnoRuntime.areSame(
    View Full Code Here

    Examples of lupos.engine.operators.multiinput.optional.Optional

    public class RuleGenerateAddOverOptional extends Rule {

      @Override
      protected void init() {
        final GenerateAddEnv genAdd = new GenerateAddEnv();
        final Optional optional = new Optional();

        // Only left Operand
        genAdd.setSucceedingOperator(new OperatorIDTuple(optional, 0));
        optional.setPrecedingOperator(genAdd);

        subGraphMap = new HashMap<BasicOperator, String>();
        subGraphMap.put(genAdd, "genAdd");
        subGraphMap.put(optional, "optional");
    View Full Code Here

    Examples of lupos.engine.operators.multiinput.optional.Optional

        startNode = genAdd;
      }

      @Override
      protected boolean checkPrecondition(final Map<String, BasicOperator> mso) {
        final Optional optional = (Optional) mso.get("optional");
        final GenerateAddEnv genAdd = (GenerateAddEnv) mso.get("genAdd");

        final Object[] optionalVars = optional.getIntersectionVariables()
            .toArray();
        final Object[] v = genAdd.getConstants().keySet().toArray();

        // All Tuples should not have a join-partner of the Optional on the left
        // side
    View Full Code Here
    TOP
    Copyright © 2018 www.massapi.com. All rights reserved.
    All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.