Enumeration hasMoreElements - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Enumeration hasMoreElements method.

This code example shows how to use the following methods:hasMoreElements, nextElement
	/* (non-Javadoc) 
	 * @see net.sf.jasperreports.engine.JRDataSource#next() 
	 */ 
	public boolean next() throws JRException { 
 
		if (e.hasMoreElements()) {
			currRow = e.nextElement();
			processedCount++;
			if (log.isInfoEnabled()) { 
				if (debugRow != null) {
					log.info("DetailRow: " + debugRow);
				} //~ if (debugRow != null) 
				debugRow = new NSMutableDictionary<String, Object>();
				if (currRow instanceof EOEnterpriseObject) {
					EOEnterpriseObject eo = (EOEnterpriseObject) currRow;
					debugRow.takeValueForKey(eo.editingContext().globalIDForObject(eo), "_globalID");
				} //~ if (currRow instanceof EOEnterpriseObject) 
			} //~ if (log.isDebugEnabled()) 
			return true; 
		} 
7
CodeRank
This code example shows how to use the following methods:hasMoreElements, nextElement
          return null; 
        } 
        Enumeration<LedgerEntry> entries 
          = lh.readEntries(readEntries, readEntries);
        readEntries++;
        if (entries.hasMoreElements()) {
            LedgerEntry e = entries.nextElement();
            assert !entries.hasMoreElements();
            return e.getEntryInputStream();
        } 
      } catch (BKException e) {
        throw new IOException("Error reading entries from bookkeeper", e);
      } catch (InterruptedException e) {
        throw new IOException("Interrupted reading entries from bookkeeper", e);
      } 
      return null; 
    } 
 
    @Override 
    public int read() throws IOException { 
7
CodeRank
This code example shows how to use the following methods:hasMoreElements
 
        public void close() { 
        } 
 
        public boolean hasMoreElements() { 
            return domains.hasMoreElements();
        } 
 
        public boolean hasMore() { 
            return domains.hasMoreElements();
        } 
 
        public NameClassPair next() { 
            String name = (String) domains.nextElement();
            Object value = ctxMap.get(name);
            String className = value.getClass().getName();
            NameClassPair pair = new NameClassPair(name, className);
            return pair;
        } 
 
7
CodeRank
This code example shows how to use the following methods:hasMoreElements, nextElement
This code example shows how to use the following methods:hasMoreElements, nextElement
    { 
 
        Enumeration e = seq.getObjects();
 
        // status 
        pkiStatusInfo = PKIStatusInfo.getInstance(e.nextElement());
 
        if (e.hasMoreElements())
        { 
            timeStampToken = ContentInfo.getInstance(e.nextElement());
        } 
    } 
 
    public TimeStampResp(PKIStatusInfo pkiStatusInfo, ContentInfo timeStampToken)
    { 
        this.pkiStatusInfo = pkiStatusInfo;
        this.timeStampToken = timeStampToken;
    } 
 
    public PKIStatusInfo getStatus() 
7
CodeRank
This code example shows how to use the following methods:hasMoreElements, nextElement
    private DHParameter( 
        ASN1Sequence  seq)
    { 
        Enumeration     e = seq.getObjects();
 
        p = ASN1Integer.getInstance(e.nextElement());
        g = ASN1Integer.getInstance(e.nextElement());
 
        if (e.hasMoreElements())
        { 
            l = (ASN1Integer)e.nextElement();
        } 
        else 
        { 
            l = null;
        } 
    } 
 
    public BigInteger getP()
    { 
6
CodeRank
This code example shows how to use the following methods:hasMoreElements, nextElement
		if (path.length() == 0)
			path = "/"; //$NON-NLS-1$
		String file = resourceName.substring(lastSlash + 1);
		Enumeration entryPaths = bundle.findEntries(path, file, false);
 
		if (entryPaths != null && entryPaths.hasMoreElements())
			return (URL) entryPaths.nextElement();
 
		return null; 
	} 
 
	@SuppressWarnings("unchecked") 
	public Set getResourcePaths(String path) {
		if (bundlePath != null)
			path = bundlePath + path;
 
		Enumeration entryPaths = bundle.findEntries(path, null, false);
		if (entryPaths == null)
			return null; 
 
7
CodeRank
This code example shows how to use the following methods:hasMoreElements, nextElement
    public ContentInfo( 
        ASN1Sequence  seq)
    { 
        Enumeration   e = seq.getObjects();
 
        contentType = (DERObjectIdentifier)e.nextElement();
 
        if (e.hasMoreElements())
        { 
            content = ((ASN1TaggedObject)e.nextElement()).getObject();
        } 
    } 
 
    public ContentInfo( 
        DERObjectIdentifier contentType,
        DEREncodable        content)
    { 
        this.contentType = contentType;
        this.content = content;
    } 
7
CodeRank
This code example shows how to use the following methods:hasMoreElements, nextElement
        NetworkInterface inf = getNetworkInterface();
        if (inf == null) {
            return null; 
        } else { 
            Enumeration<InetAddress> addresses = inf.getInetAddresses();
            if (addresses.hasMoreElements()) {
                return addresses.nextElement();
            } 
            return null; 
        } 
    } 
 
    @Override 
    public DatagramChannelConfig setInterface(InetAddress interfaceAddress) {
        try { 
            setNetworkInterface(NetworkInterface.getByInetAddress(interfaceAddress));
        } catch (SocketException e) {
            throw new ChannelException(e);
        } 
        return this;
6
CodeRank
This code example shows how to use the following methods:hasMoreElements, nextElement
		if (path.length() == 0)
			path = "/"; //$NON-NLS-1$
		String file = resourceName.substring(lastSlash + 1);
		Enumeration<URL> entryPaths = bundle.findEntries(path, file, false);
 
		if (entryPaths != null && entryPaths.hasMoreElements())
			return entryPaths.nextElement();
 
		return null; 
	} 
 
	public Set<String> getResourcePaths(String path) {
		if (bundlePath != null)
			path = bundlePath + path;
 
		Enumeration<URL> entryPaths = bundle.findEntries(path, null, false);
		if (entryPaths == null)
			return null; 
 
		Set<String> result = new HashSet<String>();
7
CodeRank

Related Enumeration hasMoreElements Questions & Answers:

hasMoreElements Method Overview
Tests if this enumeration contains more elements.
See Code Examples for other Java 8 Enumeration Methods: