public RelationshipType[] toTypeArray() { return types == null || types.isEmpty() ? RelationshipType.values() : types.toArray( new RelationshipType[types.size()] ); }
@Override public Set<RelationshipType> getAllowedTypes() { final Set<RelationshipType> types = new HashSet<>(); types.addAll( Arrays.asList( RelationshipType.values() ) ); return types; }
public RelationshipType[] toTypeArray() { return types == null || types.isEmpty() ? RelationshipType.values() : types.toArray( new RelationshipType[types.size()] ); }
@Override public Set<RelationshipType> getAllowedTypes() { final Set<RelationshipType> types = new HashSet<>(); types.addAll( Arrays.asList( RelationshipType.values() ) ); return types; }
public static RelationshipType getType( String type ) { if ( type == null || type.trim() .length() < 1 ) { return null; } type = type.trim(); for ( final RelationshipType rt : values() ) { if ( rt.name().equals(type)) { return rt; } for ( final String name : rt.names() ) { if ( name.equalsIgnoreCase( type ) ) { return rt; } } } return null; }
public ProjectRelationshipFilter getTypeFilter() { if ( types == null || types.isEmpty() || new HashSet<RelationshipType>( types ).containsAll( Arrays.asList( RelationshipType.values() ) ) ) { return AnyFilter.INSTANCE; } else { return new RelationshipTypeFilter( types, isManagedIncluded(), isConcreteIncluded() ); } }
public ProjectRelationshipFilter getTypeFilter() { if ( types == null || types.isEmpty() || new HashSet<RelationshipType>( types ).containsAll( Arrays.asList( RelationshipType.values() ) ) ) { return AnyFilter.INSTANCE; } else { return new RelationshipTypeFilter( types, isManagedIncluded(), isConcreteIncluded() ); } }