Package java.util

Examples of java.util.Vector.firstElement()


    }

    Vector events = decodeEvents(document);

    if (events.size() > 0) {
      return (LoggingEvent) events.firstElement();
    }

    return null;
  }
View Full Code Here


    {
      Vector v = sd.getBusinessServiceVector();

      if (v != null && v.size() > 0)
      {
        result = (BusinessService) v.firstElement();
      }
    }

    return result;
  }
View Full Code Here

    {
      Vector v = bd.getBusinessEntityVector();

      if (v != null && v.size() > 0)
      {
        result = (BusinessEntity) v.firstElement();
      }
    }

    return result;
  }
View Full Code Here

      {
        Vector v = bd.getTModelVector();

        if (v != null && v.size() > 0)
        {
          result = (TModel) v.firstElement();
        }
      }
    }
    catch (Throwable e)
    {
View Full Code Here

    parseBuffer.addElement(
                    new ElementSpec(attr, ElementSpec.ContentType,
             n - lastOffset));
      }

      ElementSpec first = (ElementSpec) parseBuffer.firstElement();

      int docLength = getLength();

      // Check for join previous of first content.
      if(first.getType() == ElementSpec.ContentType &&
View Full Code Here

    Vector v = getHeaders(name);
    if (v == null) {
      return null;
    }
   
    return (String) (v.firstElement());
  }
   
  /**
   * Get headers with the name.  Multiple value can be returned.
   * @param name
View Full Code Here

                  if (! isAscending[i])
                    ascIndex = false;
                  break;
                }
              }
              FromBaseTable fbt = (FromBaseTable)tableVector.firstElement();
              MaxMinAggregateDefinition temp = (MaxMinAggregateDefinition)ad;

              /*  MAX   ASC      NULLABLE
                             *  ----  ----------
               *  TRUE  TRUE      TRUE/FALSE  =  Special Last Key Scan (ASC Index Last key with null skips)
View Full Code Here

      // second: add the string to the vector
      NativeWrapper.vectorAdd(vector, value);

      // now, check for the string
      assertTrue(vector.firstElement() == value);
  }

    /**
     * Test case that tries to add a "null" value to a
     * Vector
 
View Full Code Here

            assertNotNull(fragment);
            Vector securityEntries = fragment.getSecurityEntries();
            assertTrue("Security Entries exist", !securityEntries.isEmpty());

            // test abstract
            SecurityEntry securityEntry = (SecurityEntry) securityEntries.firstElement();
            assertNotNull("Got first Security Entry", securityEntry);
            assertTrue("Getting expect security entry", securityEntry.getName().equals("basic_testcase"));

            // Get the action
            Vector securityAccesses = securityEntry.getAccesses();
View Full Code Here

            assertTrue("Getting expect security entry", securityEntry.getName().equals("basic_testcase"));

            // Get the action
            Vector securityAccesses = securityEntry.getAccesses();
            assertNotNull("Got SecurityAccesses", securityAccesses);
            SecurityAccess securityAccess = (SecurityAccess) securityAccesses.firstElement();
            assertNotNull("Got SecurityAccess", securityAccess);
            assertEquals("Verify action", "view", securityAccess.getAction());

            // Get allows
            Vector securityAllows = securityAccess.getAllows();
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.