org.jboss.dna.connector.federation.contribution
Class NonEmptyContribution

java.lang.Object
  extended by org.jboss.dna.connector.federation.contribution.Contribution
      extended by org.jboss.dna.connector.federation.contribution.NonEmptyContribution
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
MultiChildContribution, MultiPropertyContribution, OneChildContribution, OnePropertyContribution, ThreePropertyContribution, TwoChildContribution, TwoPropertyContribution

@Immutable
public abstract class NonEmptyContribution
extends Contribution

The record of a non-empty source contribution from a single location within the source.

Author:
Randall Hauch
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jboss.dna.connector.federation.contribution.Contribution
Contribution.EmptyIterator<T>, Contribution.ImmutableIterator<T>, Contribution.OneValueIterator<T>, Contribution.ThreeValueIterator<T>, Contribution.TwoValueIterator<T>
 
Field Summary
 
Fields inherited from class org.jboss.dna.connector.federation.contribution.Contribution
EMPTY_CHILDREN_ITERATOR, EMPTY_PROPERTY_ITERATOR
 
Constructor Summary
protected NonEmptyContribution(String sourceName, org.jboss.dna.graph.properties.Path pathInSource, org.jboss.dna.graph.properties.DateTime expirationTime)
          Create a contribution of node properties from the source with the supplied name.
 
Method Summary
 boolean equals(Object obj)
          

This implementation only compares the source name.

 org.jboss.dna.graph.properties.Path getPathInSource()
          Get the source-specific path of this information.
 int hashCode()
          

This implementation returns the hash code of the source name, and is compatible with the implementation of Contribution.equals(Object). This implementation returns the hash code of the source name, and is compatible with the implementation of equals(Object).

 
Methods inherited from class org.jboss.dna.connector.federation.contribution.Contribution
create, create, create, create, create, createPlaceholder, createPlaceholder, getChildren, getChildrenCount, getExpirationTimeInUtc, getProperties, getProperty, getPropertyCount, getSourceName, isEmpty, isExpired, isPlaceholder, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NonEmptyContribution

protected NonEmptyContribution(String sourceName,
                               org.jboss.dna.graph.properties.Path pathInSource,
                               org.jboss.dna.graph.properties.DateTime expirationTime)
Create a contribution of node properties from the source with the supplied name.

Parameters:
sourceName - the name of the source, which may not be null or blank
pathInSource - the path in the source for this contributed information; may not be null
expirationTime - the time (in UTC) after which this contribution should be considered expired, or null if there is no expiration time
Method Detail

getPathInSource

public org.jboss.dna.graph.properties.Path getPathInSource()
Get the source-specific path of this information.

Specified by:
getPathInSource in class Contribution
Returns:
the path as known to the source, or null for EmptyContribution
See Also:
Contribution.getPathInSource()

hashCode

public int hashCode()

This implementation returns the hash code of the source name, and is compatible with the implementation of Contribution.equals(Object).

This implementation returns the hash code of the source name, and is compatible with the implementation of equals(Object).

Overrides:
hashCode in class Contribution

equals

public boolean equals(Object obj)

This implementation only compares the source name.

Overrides:
equals in class Contribution


Copyright © 2008-Present JBoss a division of Red Hat. All Rights Reserved.