/** * {@inheritDoc} */ public Set<Class<? extends APIOperation>> getSupportedOperations() { return CollectionUtil.newReadOnlySet(_supportedOperations); }
/** * {@inheritDoc} */ @Override public Set<Class<? extends APIOperation>> getSupportedOperations() { return CollectionUtil.newReadOnlySet(supportedOperations); }
public void setOperations(Set<Class<? extends APIOperation>> set) { operations = CollectionUtil.newReadOnlySet(set); }
public Set<AttributeInfo> getAttributeInfo() { return CollectionUtil.newReadOnlySet(_info); }
public Set<AttributeInfo> getAttributeInfo() { return CollectionUtil.newReadOnlySet(attributeInfos); }
/** * {@inheritDoc} */ @Override public Set<Class<? extends APIOperation>> getSupportedOperations() { return CollectionUtil.newReadOnlySet(supportedOperations); }
public Set<AttributeInfo> getAttributeInfo() { return CollectionUtil.newReadOnlySet(attributeInfos); }
/** * Return all the known {@link SPIOperation}s. */ public static Set<Class<? extends SPIOperation>> allSPIOperations() { return CollectionUtil.newReadOnlySet(SPI_TO_API.keySet()); }
/** * Get the set of attributes that represent this object. This includes the * {@link Uid} and all {@link OperationalAttributes}. */ public Set<Attribute> getAttributes() { // create a copy/unmodifiable set.. return CollectionUtil.newReadOnlySet(this.attrs.values()); }
/** * Get the set of attributes that represent this object. * * This includes the {@link Uid} and all {@link OperationalAttributes}. */ public Set<Attribute> getAttributes() { // create a copy/unmodifiable set.. return CollectionUtil.newReadOnlySet(this.attributeMap.values()); }
/** * Return all the known {@link SPIOperation}s. */ public static Set<Class<? extends SPIOperation>> allSPIOperations() { return CollectionUtil.newReadOnlySet(SPI_TO_API.keySet()); }
/** * Return all the known {@link SPIOperation}s. */ public static Set<Class<? extends SPIOperation>> allSPIOperations() { return CollectionUtil.newReadOnlySet(SPI_TO_API.keySet()); }
/** * Get the set of attributes that represent this object. * * This includes the {@link Uid} and all {@link OperationalAttributes}. */ public Set<Attribute> getAttributes() { // create a copy/unmodifiable set.. return CollectionUtil.newReadOnlySet(this.attributeMap.values()); }
/** * Return all the known {@link APIOperation}s. */ public static Set<Class<? extends APIOperation>> allAPIOperations() { Set<Class<? extends APIOperation>> set = new HashSet<Class<? extends APIOperation>>(); set.addAll(SPI_TO_API.values()); // add Get/Validate because it doesn't have a corresponding SPI. set.add(GetApiOp.class); set.add(ValidateApiOp.class); return CollectionUtil.newReadOnlySet(set); }
/** * Return all the known {@link APIOperation}s. */ public static Set<Class<? extends APIOperation>> allAPIOperations() { Set<Class<? extends APIOperation>> set = new HashSet<Class<? extends APIOperation>>(); set.addAll(SPI_TO_API.values()); // add Get/Validate because it doesn't have a corresponding SPI. set.add(GetApiOp.class); set.add(ValidateApiOp.class); return CollectionUtil.newReadOnlySet(set); }
/** * Return all the known {@link APIOperation}s. */ public static Set<Class<? extends APIOperation>> allAPIOperations() { Set<Class<? extends APIOperation>> set = new HashSet<Class<? extends APIOperation>>(); set.addAll(SPI_TO_API.values()); // add Get/Validate because it doesn't have a corresponding SPI. set.add(GetApiOp.class); set.add(ValidateApiOp.class); return CollectionUtil.newReadOnlySet(set); }
/** * Builds a 'ConnectorObject' based on the attributes and Uid provided. */ public ConnectorObject build() { // check that there are attributes to return.. if (attributeMap.size() == 0) { throw new IllegalStateException("No attributes set!"); } Set<Attribute> attrs = CollectionUtil.newReadOnlySet(attributeMap.values()); return new ConnectorObject(objectClass, attrs); } }
/** * Builds a 'ConnectorObject' based on the attributes and Uid provided. */ public ConnectorObject build() { // check that there are attributes to return.. if (attributeMap.size() == 0) { throw new IllegalStateException("No attributes set!"); } Set<Attribute> attrs = CollectionUtil.newReadOnlySet(attributeMap.values()); return new ConnectorObject(objectClass, attrs); } }
/** * Builds a 'ConnectorObject' based on the attributes and Uid provided. */ public ConnectorObject build() { // check that there are attributes to return.. if (_attrs.size() == 0) { throw new IllegalStateException("No attributes set!"); } Set<Attribute> attrs = CollectionUtil.newReadOnlySet(_attrs.values()); return new ConnectorObject(_objectClass,attrs); }
@Test public void testReadonlySet() { String[] data = { "a", "b", "c" }; Set<String> expected = CollectionUtil.newReadOnlySet("a", "b", "c"); Set<String> actual = CollectionUtil.newReadOnlySet(data); assertEquals(actual, expected); }