protected static final int DEFAULT_CAPACITY = 3;
public static final int NO_DATA = -1;
+
+ private static final Object[] EMPTY_ARRAY = new Object[0];
public IntSet() {
support = null;
@Override
public Object[] toArray() {
- throw new UnsupportedOperationException();
+ if(data != null) {
+ Object[] result = new Object[sizeOrData];
+ for(int i=0;i<sizeOrData;++i)
+ result[i] = new ResourceImpl(support, data[i]);
+ return result;
+ }
+ else if(sizeOrData == NO_DATA)
+ return EMPTY_ARRAY;
+ else
+ return new Object[] { new ResourceImpl(support, sizeOrData) };
}
@Override
isInheritedFrom :: Resource -> Resource -> <ReadGraph> Boolean
getRootLibrary :: () -> <ReadGraph> Resource
+
+ @JavaName getPredicates
+ predicatesOf :: Resource -> <ReadGraph> [Resource]
importJava "org.simantics.db.layer0.util.ExtendedUris" where
"Converts an absolute URI to a resource"
Just c -> possibleChild c name
Nothing -> Nothing
)
- (Just parent) path
+ (Just parent) path
\ No newline at end of file