
io.permazen.cli.parse.ObjIdParser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of permazen-cli Show documentation
Show all versions of permazen-cli Show documentation
Permazen classes supporting command line interfaces.
The newest version!
/*
* Copyright (C) 2015 Archie L. Cobbs. All rights reserved.
*/
package io.permazen.cli.parse;
import com.google.common.base.Preconditions;
import io.permazen.cli.Session;
import io.permazen.core.ObjId;
/**
* Parses object IDs.
*/
public class ObjIdParser implements Parser {
public static final int MAX_COMPLETE_OBJECTS = 100;
@Override
public ObjId parse(Session session, String text) {
// Sanity check
Preconditions.checkArgument(session != null, "null session");
Preconditions.checkArgument(text != null, "null text");
// Attempt to parse id
return new ObjId(text);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy