com.clarkparsia.pellint.rdfxml.DoubtfulSet Maven / Gradle / Ivy
The newest version!
// Copyright (c) 2006 - 2008, Clark & Parsia, LLC.
// This source code is available under the terms of the Affero General Public License v3.
//
// Please see LICENSE.txt for full license terms, including the availability of proprietary exceptions.
// Questions, comments, or requests for clarification: [email protected]
package com.clarkparsia.pellint.rdfxml;
import java.util.HashSet;
import java.util.Set;
/**
*
* Title:
*
*
* Description:
*
*
* Copyright: Copyright (c) 2008
*
*
* Company: Clark & Parsia, LLC.
*
*
* @author Harris Lin
*/
public class DoubtfulSet extends HashSet {
private static final long serialVersionUID = 1L;
private HashSet m_Definite;
public DoubtfulSet() {
m_Definite = new HashSet();
}
public void clear() {
super.clear();
m_Definite.clear();
}
public boolean remove(Object o) {
m_Definite.remove(o);
return super.remove(o);
}
public boolean addDefinite(E o) {
super.add(o);
return m_Definite.add(o);
}
public boolean containsDefinite(E o) {
return m_Definite.contains(o);
}
public Set getDefiniteElements() {
return m_Definite;
}
public Set getDoubtfulElements() {
Set doubtfulSet = new HashSet(this);
doubtfulSet.removeAll(m_Definite);
return doubtfulSet;
}
}