org.nnsoft.sameas4j
Class Equivalence

java.lang.Object
  extended by org.nnsoft.sameas4j.Equivalence
All Implemented Interfaces:
Iterable<URI>

public final class Equivalence
extends Object
implements Iterable<URI>

This class models an equivalence. An equivalence is a response given by sameas.org to a given URI in terms of other owl:sameAs URI.


Constructor Summary
protected Equivalence(URI uri)
          Creates a new Equivalence instance by the requested URI.
protected Equivalence(URL url)
          Creates a new Equivalence instance by the requested URL.
 
Method Summary
protected  void addDuplicate(URI uri)
          Adds an equivalent URI.
 boolean equals(Object object)
          
 int getAmount()
          Returns the number of equivalent URIs.
 URI getUri()
          Returns the requested URI.
 int hashCode()
          
 Iterator<URI> iterator()
          
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Equivalence

protected Equivalence(URI uri)
Creates a new Equivalence instance by the requested URI.

Parameters:
uri - the requested URI.

Equivalence

protected Equivalence(URL url)
               throws URISyntaxException
Creates a new Equivalence instance by the requested URL.

Parameters:
url - the requested URL.
Throws:
URISyntaxException
Method Detail

getUri

public URI getUri()
Returns the requested URI.

Returns:
the requested URI.

getAmount

public int getAmount()
Returns the number of equivalent URIs.

Returns:
the number of equivalent URIs.

iterator

public Iterator<URI> iterator()

Specified by:
iterator in interface Iterable<URI>

addDuplicate

protected void addDuplicate(URI uri)
Adds an equivalent URI.

Parameters:
uri - an equivalent URI.

toString

public String toString()

Overrides:
toString in class Object

equals

public boolean equals(Object object)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object


Copyright © 2009-2012 99 Software Foundation. All Rights Reserved.