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 net.sf.laja.parser.engine2.element.Optional

        // cr = "\r\n" | "\n"
        cr.add(5, new Str(4, "\r\n"));
        cr.add(7, new Str(6, "\n"));

        // row = [!cr+]:content cr
        Optional row_1 = new Optional(8, "row_1", defaultSyntaxErrorRowContent);
        Repeat row_1_1 = new Repeat(9, "row_1_1");
        row_1_1.add(10, cr, NOT);
        row_1.add(11, row_1_1);
        row.add(12, row_1);
        row.add(13, cr);

        // defaultSyntaxError = [row+] [!END+]:line END
        Optional defaultSyntaxError_1 = new Optional(14, "defaultSyntaxError_1");
        Repeat defaultSyntaxError_1_1 = new Repeat(15, "defaultSyntaxError_1_1");
        defaultSyntaxError_1_1.add(16, row);
        defaultSyntaxError_1.add(17, defaultSyntaxError_1_1);
        defaultSyntaxError.add(18, defaultSyntaxError_1);
        Optional defaultSyntaxError_2 = new Optional(19, "defaultSyntaxError_2", defaultSyntaxErrorDefaultSyntaxErrorLine);
        Repeat defaultSyntaxError_2_1 = new Repeat(20, "defaultSyntaxError_2_1");
        defaultSyntaxError_2_1.add(22, new End(21, "defaultSyntaxError_2_1", NOT));
        defaultSyntaxError_2.add(23, defaultSyntaxError_2_1);
        defaultSyntaxError.add(24, defaultSyntaxError_2);
        defaultSyntaxError.add(26, new End(25, "defaultSyntaxError"));


        return new TopElement(data2, defaultSyntaxError);
    View Full Code Here

    Examples of net.sf.laja.parser.engine2.element.Optional

        // cr = "\r\n" | "\n"
        cr.add(5, new Str(4, "\r\n"));
        cr.add(7, new Str(6, "\n"));

        // row = [!cr+]:content cr
        Optional row_1 = new Optional(8, "row_1");
        Repeat row_1_1 = new Repeat(9, "row_1_1");
        row_1_1.add(10, cr, NOT);
        row_1.add(11, row_1_1);
        row.add(12, row_1);
        row.add(13, cr);

        // defaultSyntaxError = [row+] [!END+]:line END
        Optional defaultSyntaxError_1 = new Optional(14, "defaultSyntaxError_1");
        Repeat defaultSyntaxError_1_1 = new Repeat(15, "defaultSyntaxError_1_1");
        defaultSyntaxError_1_1.add(16, row);
        defaultSyntaxError_1.add(17, defaultSyntaxError_1_1);
        defaultSyntaxError.add(18, defaultSyntaxError_1);
        Optional defaultSyntaxError_2 = new Optional(19, "defaultSyntaxError_2");
        Repeat defaultSyntaxError_2_1 = new Repeat(20, "defaultSyntaxError_2_1");
        defaultSyntaxError_2_1.add(22, new End(21, "defaultSyntaxError_2_1", NOT));
        defaultSyntaxError_2.add(23, defaultSyntaxError_2_1);
        defaultSyntaxError.add(24, defaultSyntaxError_2);
        defaultSyntaxError.add(26, new End(25, "defaultSyntaxError"));


        return new TopElement(data1, defaultSyntaxError);
    View Full Code Here

    Examples of org.apache.isis.applib.annotation.Optional

                return;
            }
            if (!Annotations.isAnnotationPresent(processMethodContext.getMethod(), Optional.class)) {
                return;
            }
            final Optional annotation = Annotations.getAnnotation(processMethodContext.getMethod(), Optional.class);
            FacetUtil.addFacet(create(annotation, processMethodContext.getFacetHolder()));
        }
    View Full Code Here

    Examples of org.apache.isis.applib.annotation.Optional

                return;
            }
            if (!Annotations.isAnnotationPresent(processMethodContext.getMethod(), Optional.class)) {
                return;
            }
            final Optional annotation = Annotations.getAnnotation(processMethodContext.getMethod(), Optional.class);
            FacetUtil.addFacet(create(annotation, processMethodContext.getFacetHolder()));
        }
    View Full Code Here

    Examples of org.apache.isis.applib.annotation.Optional

                return;
            }
            if (!isAnnotationPresent(processMethodContext.getMethod(), Optional.class)) {
                return;
            }
            final Optional annotation = getAnnotation(processMethodContext.getMethod(), Optional.class);
            FacetUtil.addFacet(create(annotation, processMethodContext.getFacetHolder()));
        }
    View Full Code Here

    Examples of org.eclipse.papyrus.sysml.activities.Optional

      @Override
      protected T doSwitch(int classifierID, EObject theEObject) {
        switch(classifierID) {
        case ActivitiesPackage.OPTIONAL:
        {
          Optional optional = (Optional)theEObject;
          T result = caseOptional(optional);
          if(result == null)
            result = defaultCase(theEObject);
          return result;
        }
    View Full Code Here

    Examples of org.hamcrest.text.pattern.internal.ast.Optional

        public static PatternComponent sequence(Object... elements) {
      return new Sequence(toPatterns(elements));
        }

        public static PatternComponent optional(Object o) {
      return new Optional(toPattern(o));
        }
    View Full Code Here

    Examples of org.jrdf.query.expression.Optional

            lhsExp = (lhsExp == null) ? EMPTY_CONSTRAINT : lhsExp;
            Expression lhs = getNext(lhsExp);
            Expression rhsExp = optional.getRhs();
            rhsExp = (rhsExp == null) ? EMPTY_CONSTRAINT : rhsExp;
            Expression rhs = getNext(rhsExp);
            expression = new Optional(lhs, rhs);
            return null;
        }
    View Full Code Here

    Examples of org.jrdf.query.expression.Optional

        }

        @Override
        public void caseAOptionalGraphPattern(AOptionalGraphPattern node) {
            Expression rhs = getExpression((PGroupGraphPattern) node.getGroupGraphPattern().clone());
            expression = new Optional(rhs);
        }
    View Full Code Here

    Examples of org.jrdf.query.expression.Optional

            Expression rhs = getExpression((PGroupGraphPattern) node.getGroupGraphPattern().clone());
            expression = new Optional(rhs);
        }

        private void handleOptional(Expression lhs, Expression rhs) {
            Optional rhsOptional = (Optional) rhs;
            if (rhsOptional.getLhs() != null) {
                expression = new Conjunction(lhs, rhsOptional);
            } else {
                rhsOptional.setLhs(lhs);
                expression = rhsOptional;
            }
        }
    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.