Examples of Multiplicity


Examples of org.apache.tuscany.spi.model.Multiplicity

    )
        throws XMLStreamException, LoaderException {
        assert REFERENCE.equals(reader.getName());

        String name = reader.getAttributeValue(null, "name");
        Multiplicity multiplicity =
            StAXUtil.multiplicity(reader.getAttributeValue(null, "multiplicity"), Multiplicity.ONE_ONE);
        Binding binding = null;
        ServiceContract serviceContract = null;
        while (true) {
            switch (reader.next()) {
View Full Code Here

Examples of org.brixcms.registry.ExtensionPoint.Multiplicity

        if (extensions == null) {
            extensions = new LinkedList<T>();
            registrations.put(point, extensions);
        }

        final Multiplicity multiplicity = point.getMultiplicity();
        switch (multiplicity) {
            case SINGLETON:
                for (Object removed : extensions) {
                    for (Listener listener : listeners) {
                        listener.unregistered(point, removed);
View Full Code Here

Examples of org.crsh.cli.impl.Multiplicity

        //
        int oneCount = 0;
        int zeroOrOneCount = 0;
        int index = 0;
        for (ArgumentDescriptor argument : arguments) {
          Multiplicity multiplicity = argument.getMultiplicity();
          if (multiplicity == Multiplicity.SINGLE) {
            if (argument.isRequired()) {
              if (oneCount + 1 > wordCount) {
                break;
              }
View Full Code Here

Examples of org.omg.uml.foundation.datatypes.Multiplicity

     * @return int the lower range of the multiplicty or 1 if it isn't defined.
     */
    private int getMultiplicityRangeLower()
    {
        Integer lower = null;
        final Multiplicity multiplicity = metaObject.getMultiplicity();
        if (multiplicity != null)
        {
            final Collection ranges = multiplicity.getRange();
            if (ranges != null && !ranges.isEmpty())
            {
                final Iterator rangeIt = ranges.iterator();
                while (rangeIt.hasNext())
                {
View Full Code Here

Examples of org.omg.uml.foundation.datatypes.Multiplicity

     * @see org.andromda.metafacades.uml.AttributeFacade#isMany()
     */
    public boolean handleIsMany()
    {
        boolean isMany = false;
        final Multiplicity multiplicity = this.metaObject.getMultiplicity();

        // assume no multiplicity is 1
        if (multiplicity != null)
        {
            final Collection ranges = multiplicity.getRange();
            if (ranges != null && !ranges.isEmpty())
            {
                final Iterator rangeIt = ranges.iterator();
                while (rangeIt.hasNext())
                {
View Full Code Here

Examples of org.omg.uml.foundation.datatypes.Multiplicity

     */
    protected Multiplicity createAttributeMultiplicity(
        DataTypesPackage dataTypes,
        boolean required)
    {
        Multiplicity mult = null;
        if (required)
        {
            mult = this.createMultiplicity(dataTypes, 1, 1);
        }
        else
View Full Code Here

Examples of org.omg.uml.foundation.datatypes.Multiplicity

    protected Multiplicity createMultiplicity(
        DataTypesPackage dataTypes,
        int lower,
        int upper)
    {
        Multiplicity mult = dataTypes.getMultiplicity().createMultiplicity();
        MultiplicityRange range = dataTypes.getMultiplicityRange().createMultiplicityRange(lower, upper);
        mult.getRange().add(range);
        return mult;
    }
View Full Code Here

Examples of org.omg.uml.foundation.datatypes.Multiplicity

     * @see org.andromda.metafacades.uml.AssociationEndFacade#isMany()
     */
    protected boolean handleIsMany()
    {
        boolean isMany = false;
        final Multiplicity multiplicity = this.metaObject.getMultiplicity();

        // we'll say a null multiplicity is 1
        if (multiplicity != null)
        {
            final Collection ranges = multiplicity.getRange();
            if (ranges != null && !ranges.isEmpty())
            {
                final Iterator rangeIt = ranges.iterator();
                while (rangeIt.hasNext())
                {
View Full Code Here

Examples of org.omg.uml.foundation.datatypes.Multiplicity

     * @return int the lower range of the multiplicty or 1 if it isn't defined.
     */
    private int getMultiplicityRangeLower()
    {
        Integer lower = null;
        final Multiplicity multiplicity = this.metaObject.getMultiplicity();
        if (multiplicity != null)
        {
            final Collection ranges = multiplicity.getRange();
            if (ranges != null && !ranges.isEmpty())
            {
                final Iterator rangeIt = ranges.iterator();
                while (rangeIt.hasNext())
                {
View Full Code Here

Examples of org.tinyuml.model.Multiplicity

 
  /**
   * Tests the equals() and hashCode() methods.
   */
  public void testEqualsHashcode() {
    Multiplicity m = Multiplicity.getBoundedInstance(3, 4);
    Multiplicity m2 = Multiplicity.getBoundedInstance(3, 4);
    Multiplicity m3 = Multiplicity.getBoundedInstance(1, 2);

    Multiplicity m4 = Multiplicity.getUnboundedInstance(2);
    Multiplicity m5 = Multiplicity.getUnboundedInstance(2);
    Multiplicity m6 = Multiplicity.getUnboundedInstance(3);

    assertFalse(m.equals(null));
    assertFalse(m.equals("someobject"));
    assertTrue(m.equals(m2));
    assertEquals(m.hashCode(), m2.hashCode());
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.