@Override public Map<String, String> getNsPrefixMap() { return CollectionFactory.createHashedMap( prefixToURI ); }
Extraction( TripleBoundary b, Graph toUpdate, Graph extractFrom ) { this.toUpdate = toUpdate; this.extractFrom = extractFrom; this.active = CollectionFactory.createHashedSet(); this.b = b; }
Extraction( TripleBoundary b, Graph toUpdate, Graph extractFrom ) { this.toUpdate = toUpdate; this.extractFrom = extractFrom; this.active = CollectionFactory.createHashedSet(); this.b = b; }
@Override public Map<String, String> getNsPrefixMap() { return CollectionFactory.createHashedMap( prefixToURI ); }
/** * <p>Returns a collection view of the values contained in this map. * Specifically, this will be a set, so duplicate values that appear * for multiple keys are suppressed.</p> * @return A set of the values contained in this map. */ @Override public Collection<To> values() { Set<To> s = CollectionFactory.createHashedSet(); for ( From from : m_table.keySet() ) { s.addAll( m_table.get( from ) ); } return s; }
@Override public Map<String, String> getNsPrefixMap() { Map<String, String> result = CollectionFactory.createHashedMap(); List<Graph> graphs = poly.getSubGraphs(); for (int i = graphs.size(); i > 0;) result.putAll( graphs.get( --i ).getPrefixMapping().getNsPrefixMap() ); result.remove( "" ); result.putAll( getBaseMapping().getNsPrefixMap() ); return result; }
/** * <p>Returns a collection view of the values contained in this map. * Specifically, this will be a set, so duplicate values that appear * for multiple keys are suppressed.</p> * @return A set of the values contained in this map. */ @Override public Collection<To> values() { Set<To> s = CollectionFactory.createHashedSet(); for ( From from : m_table.keySet() ) { s.addAll( m_table.get( from ) ); } return s; }
@Override public Map<String, String> getNsPrefixMap() { Map<String, String> result = CollectionFactory.createHashedMap(); List<Graph> graphs = poly.getSubGraphs(); for (int i = graphs.size(); i > 0;) result.putAll( graphs.get( --i ).getPrefixMapping().getNsPrefixMap() ); result.remove( "" ); result.putAll( getBaseMapping().getNsPrefixMap() ); return result; }
/** Answer a Set formed from the elements of the List <code>L</code>. */ public static <T> Set<T> listToSet( List<T> L ) { return CollectionFactory.createHashedSet( L ); }
public void testHashMapCopy() { Map<String, String> map = new HashMap<>(); map.put( "here", "Bristol" ); map.put( "there", "Oxford" ); Map<String, String> copy = CollectionFactory.createHashedMap( map ); assertEquals( map, copy ); }
/** * Answer a Set formed from the elements of the List <code>L</code>. */ public static <T> Set<T> listToSet(List<T> L) { return CollectionFactory.createHashedSet(L); }
public void testHashMapSized() { assertInstanceOf( Map.class, CollectionFactory.createHashedMap( 42 ) ); }
/** Answer a Set formed from the elements of the List <code>L</code>. */ public static <T> Set<T> listToSet( List<T> L ) { return CollectionFactory.createHashedSet( L ); }
public void testHashMapCopy() { Map<String, String> map = new HashMap<>(); map.put( "here", "Bristol" ); map.put( "there", "Oxford" ); Map<String, String> copy = CollectionFactory.createHashedMap( map ); assertEquals( map, copy ); }
/** * Answer a Set formed from the elements of the List <code>L</code>. */ public static <T> Set<T> listToSet(List<T> L) { return CollectionFactory.createHashedSet(L); }
public void testHashMapSized() { assertInstanceOf( Map.class, CollectionFactory.createHashedMap( 42 ) ); }
/** Answer the elements of the given iterator as a set. The iterator is consumed by the operation. Even if an exception is thrown, the iterator will be closed. @param i the iterator to convert @return A set of the members of i */ public static <T> Set<T> iteratorToSet( Iterator<? extends T> i ) { Set<T> result = CollectionFactory.createHashedSet(); try { while (i.hasNext()) result.add( i.next() ); } finally { NiceIterator.close( i ); } return result; }
public void testHashMapExists() { assertInstanceOf( Map.class, CollectionFactory.createHashedMap() ); }
/** Answer the elements of the given iterator as a set. The iterator is consumed by the operation. Even if an exception is thrown, the iterator will be closed. @param i the iterator to convert @return A set of the members of i */ public static <T> Set<T> iteratorToSet( Iterator<? extends T> i ) { Set<T> result = CollectionFactory.createHashedSet(); try { while (i.hasNext()) result.add( i.next() ); } finally { NiceIterator.close( i ); } return result; }
public void testHashMapExists() { assertInstanceOf( Map.class, CollectionFactory.createHashedMap() ); }