org.hisp.dhis.query.Direction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dhis2-java-client Show documentation
Show all versions of dhis2-java-client Show documentation
DHIS 2 API client for Java.
package org.hisp.dhis.query;
import lombok.RequiredArgsConstructor;
/**
* Enumeration of order direction.
*
* @author Lars Helge Overland
*/
@RequiredArgsConstructor
public enum Direction
{
ASC( "asc" ),
DESC( "desc" );
private final String value;
/**
* Returns the direction with a value matching the given string.
*
* @param value the value.
* @return an {@link Direction} or null if no match.
*/
public static Direction fromValue( String value )
{
for ( Direction direction : Direction.values() )
{
if ( direction.value().equals( value ) )
{
return direction;
}
}
return null;
}
public String value()
{
return value;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy